Vox Populi(x) forum

Alexandria Book Library => Errori (Bugs) => Topic started by: iberan on 22 November 2025, 16:20:42

Title: Attempt to modify property "params" on null
Post by: iberan on 22 November 2025, 16:20:42
Hi Federica,

Attempt to modify property "params" on null – this error message comes, when filtering a category list with 0 result, if this category has any description.

I thing the bug is in /components/com_abook/views/category/viewhtml.php #98

if ($category->description != ''){
//inizio plugin
                $category->text=$category->description;
                PluginHelper::importPlugin('content');
Factory::getApplication()->triggerEvent('onContentPrepare', array('com_abook.category', &$category, &$category->params, 0));
                $category->description=$category->text;
//fine plugin
}

Commented out this part of script fixes this problem.

Yours,

István
Title: Re: Attempt to modify property "params" on null
Post by: Slacker on 24 November 2025, 07:17:30
I asked ChatGPT about this and got suggestion to add just before:
if (empty($category->params)) {
    $category->params = new Joomla\Registry\Registry;
}