Vox Populi(x) forum

Alexandria Book Library => Errori (Bugs) => Topic started by: RobertG on 08 August 2026, 16:03:39

Title: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 08 August 2026, 16:03:39
Hi,

I've just found out that you've released a RC version for J6. Thank you very much!
I first tried to install the 4.0.8 on a new website where I had imported the previous tables, not installed AB 4.0.6, and it failed.
So I cloned my J5 website and added your new version.
Displaying the lists of authors and books works fine.
But on the book categories list, when I click on a category, I get an error 500 Joomla\CMS\HTML\HTMLHelper abyear not found. in /libraries/src/HTML/HTMLHelper.php:159
First error on JROOT/components/com_abook/views/category/tmpl/default_items.php:80, other on line 89.

If I hide year and editor, the page is displayed.
Regards,
Robert
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 08 August 2026, 16:05:54
Sorry.
If I hide year and editor in the menu link options, the page is displayed.
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 08 August 2026, 16:30:27
Another error with smart search plugin 4.0.7
When I try to index:
Call to undefined method Joomla\Database\Mysqli\MysqliQuery::castAsChar()
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 08 August 2026, 17:43:12
In a book page or in the author list, when I click on the author name
ERROR 0 - count(): Argument #1 ($value) must be of type Countable|array, false given
file JROOT/components/com_abook/models/author.php:41

And at the bottom of the page, I have that text I didn't have on h=the J5 website:  COM_ABOOK_DATE_MODIFIED: 30 Novembre -0001
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 08 August 2026, 19:23:56
Now on a blank website 6.1.2 (french)
I installed AB 4.0.8 and the other packs 4.0.7
I didn't change any settings and I imported the SQL export from the J5 site.

The 'Authors' menu link leads to "There is no "chosen" asset of a "preset" type in the registry."
Indexing fails with the same error.
The footer information is correct
"Modified date: 8 Août 2026"

A link to an author works fine

From the books list and the book page, a click on an author name displays an error
count(): Argument #1 ($value) must be of type Countable|array, false given

In the all in one module, although I asked for the image not to be displayed, and only the title to appear, the default image is still shown.
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 09 August 2026, 11:08:18
New tests on local sites.

1/ my Joomla 5 books site cloned, PHP 8.4
Installation of Abook 4.0.8 and other packages 4.0.7
Installation of my own french translation
Check the list of authors:
List of authors OK
Click on author OK
Click on a title of book OK
On book display, click on tag OK, click on author OK, click on category: error 500 Joomla\CMS\HTML\HTMLHelper abyear not found (JROOT\components\com_abook\views\category\tmpl\default_items.php:80 )
Same error for the click on a category in books categories listing.

2/ blank site
Joomla 6.1.2 PHP 8.4
Installation of Abook 4.0.8 and other packages 4.0.7
Installation of my own french translation
I create a menu link to authors and another one for categories
None was added in the component, it's blank
Click on category, no data but no error
Click on authors: same error 0There is no "chosen" asset of a "preset" type in the registry
I begin to add data in the backend
Adding pulisher OK
Adding author OK
Adding category:
"( ! ) Deprecated: AbookTableCategory::_getAssetParentId(): Implicitly marking parameter $table as nullable is deprecated, the explicit nullable type must be used instead in D:\wamp64\www\livres6\administrator\components\com_abook\tables\category.php on line 47"
Creating the category OK
Adding a book OK.
Frontend:
List of category OK
Click on the category OK, the book is displayed, but 2 warnings
Warning: Undefined property: AbookViewCategory::$path in D:\wamp64\www\livres6\components\com_abook\views\category\view.html.php on line 184
Warning: foreach() argument must be of type array|object, null given in D:\wamp64\www\livres6\components\com_abook\views\category\view.html.php on line 184
On the book's display
Click on category, same warnings, no error
Click on author name
Warning: Undefined property: AbookViewAuthor::$path in D:\wamp64\www\livres6\components\com_abook\views\author\tmpl\default.php on line 37
no error
Menu link to a category: no error

I'm going to run some more tests after importing my data from the J5 website.

A question: why "edited by" displays the author, not the publisher?
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 09 August 2026, 11:30:33
What?
I deleted books, author, category and publisher from the Abook management and tried to import my old datas. Error.
I checked the database, but the Abook tables were no longer there ! :(
I needed to uninstall the component, since reinstalling it only added #__ablend and no other tables.
I reinstalled the component and the tables were created successfully.

On the import page
Deprecated: AbookTableCategory::_getAssetParentId(): Implicitly marking parameter $table as nullable is deprecated, the explicit nullable type must be used instead in D:\wamp64\www\livres6\administrator\components\com_abook\tables\category.php on line 47
The sql was well imported.
Still the same error with the menu link showing the authors
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 10 August 2026, 16:53:46
A new error: when I disable "written by" for the books, on the frontend book page I get
Warning: Undefined variable $description in /components/com_abook/views/book/tmpl/default.php on line 413 and no description is displayed.
When I enable it, There are no more errors, but the description is preceded by 'Written by Robert Gastaud' (the author of the description), which I don't want to display. How can I hide this text?
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: federica on 11 August 2026, 18:50:38

I fixed 2 errors:

Please try to install 4.0.9 version
Thanks
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: federica on 11 August 2026, 18:56:55
Quote from: RobertG on 10 August 2026, 16:53:46A new error: when I disable "written by" for the books,
I will publish the fix to the next version
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 11 August 2026, 19:27:54
Thank you, Federica!

I have 468 books, but only 50 were indexed.
What could explain this limitation?
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: federica on 11 August 2026, 19:41:08
Thank you too

Go to Smart search configuration->index->Indexer Batch Size
This parameter is probably set to "50"
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 11 August 2026, 19:51:46
OK, it's true, nut isn't there a risk of an error if I increase?
I set it to 100, and 100 books are now indexed – no more. Even If I restart the indexation.
Why aren't the following being sought?
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: federica on 11 August 2026, 22:05:44
Joomla settings allow you to limit the index to avoid uncontrolled database growth and excessive workload in generating search results. The "Indexer Batch Size" value depends on your server's performance.
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 12 August 2026, 10:02:52
Federica, I'm testing a client's site on my server.

The site contains 1,428 articles. I cleared the index and restarted it; the result is indeed 1,428 indexed articles.
Indexing is carried out in batches and does not stop at the end of the first batch; it continues until everything that can be indexed has been indexed..

On my website, only 100 of the 468 books have been indexed, and to index the rest, I have to edit them one by one and save them. Once I've done that, they're added to the index.
Why does this indexing stop after the first batch?
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: federica on 12 August 2026, 11:18:43
You are right but I found that the same behavior happens even with articles.

I tried to clear index (maintenance->clear index) then re-index again.

In my installation not even one article is indexed, but when I modify an article then it is indexed.
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 12 August 2026, 12:11:00
It's odd – I've tested it on other sites, and on some of them, Alexandria Book's indexing stops at 50.
I've added another website: 393 articles, 45 categories and 1 contact have been indexed.
I cleared the index and started again, but nothing changed – the figures are exactly the same.
I installed Abook 4.0.9 and the Smart Search plugin, imported my own data, then activated the plugin and restarted the indexing process.
Now, I do have all the books, but only 30 categories of articles instead of 45, and no articles or contacts at all!
It's incomprehensible.
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 12 August 2026, 12:26:47
So I made a new test on my online J6 site for Abook.
The indexation stopped on 100 books, nothing else has been indexed. :(
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 12 August 2026, 17:35:51
Other test: I set the number of data from 50 to 300 and got the error
A parsing error occurred whilst processing the following JSON data:
JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 488 of the JSON 

However, the 300 books are well indexed (though 170 are missing).
No category, no article were indexed.

If I set Indexer batch size to 150, 150 books are indexed, nothing else.

I tried 300 on the local site where 450 books were indexed, and now all are indexed, categories and articles too.

It looks as though an error is occurring that stops the indexing process without displaying a message on the screen.
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 12 August 2026, 17:49:21
Sometimes, on the index page, during indexing, a message appears stating Abook 0 Of 1 instead of 0 of 470, when the count of categories and articles are correct (Articles 0 Of 11, for example).
Could that be the reason why indexing stopped after the first batch?
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 13 August 2026, 08:28:20
Hi,

I've carried out some more tests, and I really don't understand why, at only one local site, everything is indexed correctly when I set the limit to 300, whereas for all the others, indexing stops at the specified number of lines, whether that's 50 or 300.

On my main test site, I uninstalled Abook because when I tried to replace the previous data with the export by deleting the old data, the tables were deleted.
I reinstalled version 4.0.9 and my own data, and for the moment, it seems that only the list of authors is causing an error:
There is no "chosen" asset of a "preset" type in the registry.

On the author page (from a book), a warning:
Warning: Undefined property: AbookViewAuthor::$path in /home/***********/livresj6/components/com_abook/views/author/tmpl/default.php on line 37
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: federica on 13 August 2026, 11:21:10
I found 2 little errors.
in components/com_abook/models/author.php line 158
replace from:
$query->whereIn($db->quoteName('a.access'), $groups)to:
$query->whereIn($db->quoteName('book.access'), $groups)
QuoteThere is no "chosen" asset of a "preset" type in the registry.
views/authors/tmpl/default_items.php delete the line 26
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 13 August 2026, 15:54:19
Thank you, Federica!
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: federica on 13 August 2026, 18:07:46
I haven't solved the indexing issue yet, I will let you know when I find a solution.
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 13 August 2026, 18:50:16
OK, thank you!
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 14 August 2026, 11:02:57
Hi,

I tested Abook version 4.0.10 on two websites and didn't notice any errors on the frontend, even with PHP 8.5  :)
I haven't checked everything in the admin section yet.
Thank you, Federica!
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 14 August 2026, 16:25:43
As for indexing, I ran another search: the query still returns 1 in "protected function getListQuery($query = null)" in finder/abbook/abook.php
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: federica on 14 August 2026, 22:01:34
I found the problem of indexing crashing after the first batch!!!!
I will release the new version of the plugin next week
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 14 August 2026, 22:56:52
Wonderful :)
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: federica on 17 August 2026, 10:34:38
Please, download the new version 4.0.9
https://alexandriabooklibrary.org/en/downloads/29-plugins.html
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 17 August 2026, 11:09:29
Thank you, Federica!
Tested on two sites – locally and on a remote server – the indexing worked perfectly.

Do you think I can update my website and migrate it to Joomla version 6 just yet?
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 17 August 2026, 11:34:42
I forgot: tested on PHP 8.5  :)
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: federica on 19 August 2026, 14:10:21
Quote from: RobertG on 17 August 2026, 11:09:29Do you think I can update my website and migrate it to Joomla version 6 just yet?
In general, yes, but if you want, you can wait for Joomla to validate the component.
Quote from: RobertG on 17 August 2026, 11:34:42I forgot: tested on PHP 8.5  :)
No problem, Joomla currently recommends PHP8.4 https://manual.joomla.org/docs/next/get-started/technical-requirements/
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 19 August 2026, 15:19:02
Thank you, Federica!
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 19 August 2026, 16:27:37
Without debug, no error on 6.2.0 beta2-dev and PHP 8.5 on a local website

With debug and error reporting to maximum, some warnings on PHP 6.4 and 6.5
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: RobertG on 19 August 2026, 16:33:01
Sorry: PHP 8.4 and 8.5!
Title: Re: AB 4.0.8 Categry bug on frontend
Post by: federica on 20 August 2026, 18:22:08
Quote from: RobertG on 17 August 2026, 11:09:29Do you think I can update my website and migrate it to Joomla version 6 just yet?
Joomla has released Abook 4.0.12 in the JED, you can try updating but remember to make a backup before proceeding.