AB 4.0.8 Categry bug on frontend

Started by RobertG, 08 August 2026, 16:03:39

Previous topic - Next topic

RobertG

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

RobertG

Sorry.
If I hide year and editor in the menu link options, the page is displayed.

RobertG

Another error with smart search plugin 4.0.7
When I try to index:
Call to undefined method Joomla\Database\Mysqli\MysqliQuery::castAsChar()

RobertG

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

RobertG

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.

RobertG

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?

RobertG

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