Error when making category for registered

Started by anunja, 24 May 2024, 15:17:02

Previous topic - Next topic
A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

anunja

Hello, friends!
I need to hide my Abook content from public. But when i set access "registered" for the category i see 'Page not found' and error 'sizeof(): Argument #1 ($value) must be of type Countable|array, bool given'. What shoul l do? Please help!
PHP 8.2, joomla 5.1.0

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

federica

Hi anunja,
which Abook version are you using?
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

anunja

Hello!
Joomla 5.1.0
Alexandria Book Library 4.0.2

federica

#3
You are right!
To fix them you can modify your_site/components/com_abook/models/category.php line 390
from
if (sizeof($this->_children)) {to
if ($this->_children) {
After the change the error displayed will be "404 Category non found".

I will publish the fix to the next version of Abook.

In case of access to unauthorized content, perhaps it would be better to show the login form. I put this change on the todo list.
Al mondo ci sono 10 tipi di persone, quelli che hanno capito il codice binario e quelli che non l'hanno capito.
Informatizzati [url="https://informatizzati.org"]https://informatizzati.org[/url]
Stacca la spina [url="https://disconnessi.org"]https://disconnessi.org[/url]

A financial contribution is greatly appreciated as a support, to help us to keep live the project.
If you like this project you can donate some piece of BitCoin to this address: bc1qy5tgq6tvrckac2a57unxvqcnxamrvhduve9sj9

anunja

Grazie Federica! Io ho fatto la pagina con la forma di autorizzazione e con il link alla Alexandria category.