Hi, can I get your advice on Attempt to assign property "children" on null.
(Joomla! Version 4.3.4 PHP Version 8.2.1)
After updating Phoca Gallery from 4.5.3 to 4.5.4 if I select images in the control panel there is an error:
(It is the same when choosing Rating)
Attempt to assign property "children" on null
.../administrator/components/com_phocagallery/models/fields/phocagallerycategory.php:97
92 $categories = $db->loadObjectList('id') ?? [];
93
94 array_walk($categories, function ($category) use ($categories) {
95 if ($category->parent_id) {
96 if ($categories[$category->parent_id]->children === null)
97 $categories[$category->parent_id]->children = [];
98 $categories[$category->parent_id]->children[] = $category;
Thank you so much for your help
Attempt to assign property "children" on null
-
- Phoca Newbie
- Posts: 1
- Joined: 30 Aug 2023, 00:32
- Jan
- Phoca Hero
- Posts: 48343
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Attempt to assign property "children" on null
Hi, where exactly do you get this problem? Can you paste a screenshot so I can test it.
BTW which version of database you are using, the SQL query there:
'SELECT a.*, null AS children FROM #__phocagallery_categories AS a ORDER BY a.ordering, a.id'
just initializes the "children" property, so there should not be an yproblem with "children"?
Thank you, Jan
BTW which version of database you are using, the SQL query there:
'SELECT a.*, null AS children FROM #__phocagallery_categories AS a ORDER BY a.ordering, a.id'
just initializes the "children" property, so there should not be an yproblem with "children"?
Thank you, Jan
If you find Phoca extensions useful, please support the project
-
- Phoca Newbie
- Posts: 4
- Joined: 13 Dec 2018, 13:33
Joomla 4.4.5 - Attempt to assign property "children" on null
Hi Jan,
I would highly appreciate your help for the message "Attempt to assign property "children" on null" appearing on access to admin menu Components / Phoca galery / Images.
We have just migrated to Joomla4 the website in a test environment : https://lcso.longecotelessablesdolonne.fr/
I would be happy to enclose:
. an image of the configuration (PHP version, Maris DB Version).
. an image of debug messages, of course we can send you super user credentials.
but I don't understand how to upload in Imgur website.
Moreover Phoca Galery pages are displayed badly => https://lcso.longecotelessablesdolonne. ... udalmezeau
Many thanks in advance for your help.
Best regards.
Xavier
I would highly appreciate your help for the message "Attempt to assign property "children" on null" appearing on access to admin menu Components / Phoca galery / Images.
We have just migrated to Joomla4 the website in a test environment : https://lcso.longecotelessablesdolonne.fr/
I would be happy to enclose:
. an image of the configuration (PHP version, Maris DB Version).
. an image of debug messages, of course we can send you super user credentials.
but I don't understand how to upload in Imgur website.
Moreover Phoca Galery pages are displayed badly => https://lcso.longecotelessablesdolonne. ... udalmezeau
Many thanks in advance for your help.
Best regards.
Xavier
- Jan
- Phoca Hero
- Posts: 48343
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: Attempt to assign property "children" on null
Hi, you need to enable debug mode to get the whole error message including the trace to see which file the error is coming from.
Jan
Jan
If you find Phoca extensions useful, please support the project