Joomla\CMS\Object\CMSObject as array

Search
Other Bug Reports questions
Forum

Joomla\CMS\Object\CMSObject as array

Carst Komdeur's Avatar Carst Komdeur
Goedemiddag Peter,

we kregen bij onze nieuwe Joomla 4 (versie 4.1) sites steeds de error Joomla\CMS\Object\CMSObject as array te zien als ik via mediabeheer een map wilde aanmaken of een bestand wilde uploaden. Zowel de map als het image bestand werd wel geupload, en zichtbaar na verversen, maar de error was er elke keer weer opnieuw. Na enig spitten in de logs kwam ik dit tegen:
#Fields: datetime priority clientip category message
2022-03-07T13:28:22+00:00 CRITICAL ::1 error Uncaught Throwable of type Error thrown with message "Cannot use object of type Joomla\CMS\Object\CMSObject as array". Stack trace: #0 /Users/*/*/*/libraries/src/Plugin/CMSPlugin.php(285): RegularLabs\Library\ActionLogPlugin->onContentAfterSave('com_media.folde...', Object(Joomla\CMS\Object\CMSObject), true, Object(Joomla\CMS\Object\CMSObject))

De oplossing bleek alle Action Log plugins van de Regular Labs plugins uit te zetten.
Was dit issue al bij jullie bekend?

Groet,
Florian Julius
Peter van Westen's Avatar Peter van Westen ADMIN
Please keep the forum in English.

Please try the latest development version of Advanced Module Manager, ReReplacer or Snippets from:
regularlabs.com/development-releases

(installing 1 of those will update the Regular Labs Library which should have a fix for this)
Please post a rating at the Joomla! Extensions Directory
Kovacs Peter's Avatar Kovacs Peter
Hi

I got the same meassege with Joomla 5.1.1, PHP 8.3 on uploading an image to media. It uploads the image, but doesn't refresh the list. I can see the image after manual refresh.

This was the POST url
/administrator/index.php?option=com_media&task=api.files&format=json&mediatypes=0,1,2,3&path=local-images%3A%2Fbanners
And this was the response

error: true
code: 0
message: Cannot use object of type Joomla\CMS\Object\CMSObject as array
trace:
#0 ..../libraries/src/Plugin/CMSPlugin.php(289): PlgSystemRegularLabs->onContentAfterSave()
#1 ..../libraries/vendor/joomla/event/src/Dispatcher.php(454): Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}()
#2 ..../libraries/src/Application/EventAware.php(111): Joomla\Event\Dispatcher->dispatch()
#3 ..../administrator/components/com_media/src/Model/ApiModel.php(258): Joomla\CMS\Application\WebApplication->triggerEvent()
#4 ..../administrator/components/com_media/src/Controller/ApiController.php(205): Joomla\Component\Media\Administrator\Model\ApiModel->createFile()
#5 ..../administrator/components/com_media/src/Controller/ApiController.php(70): Joomla\Component\Media\Administrator\Controller\ApiController->postFiles()
#6 ..../libraries/src/Dispatcher/ComponentDispatcher.php(143): Joomla\Component\Media\Administrator\Controller\ApiController->execute()
#7 ..../libraries/src/Component/ComponentHelper.php(361): Joomla\CMS\Dispatcher\ComponentDispatcher->dispatch()
#8 ..../libraries/src/Application/AdministratorApplication.php(150): Joomla\CMS\Component\ComponentHelper::renderComponent()
#9 ..../libraries/src/Application/AdministratorApplication.php(195): Joomla\CMS\Application\AdministratorApplication->dispatch()
#10 ..../libraries/src/Application/CMSApplication.php(306): Joomla\CMS\Application\AdministratorApplication->doExecute()
#11 ..../administrator/includes/app.php(58): Joomla\CMS\Application\CMSApplication->execute()
#12 ..../administrator/index.php(32): require_once('...')
#13 {main}

We use Cache Cleaner, Sourcerer and Extension Manager
Peter van Westen's Avatar Peter van Westen ADMIN
Please try the latest development version of Sourcerer from:
regularlabs.com/development-releases
Please post a rating at the Joomla! Extensions Directory
Kovacs Peter's Avatar Kovacs Peter
seems working, thank you
Peter van Westen's Avatar Peter van Westen ADMIN
Ok, great 🙂
The fix will be included in the next release.
Please post a rating at the Joomla! Extensions Directory
Patrick's Avatar Patrick
Hi Peter

I can confirm the same issue on all websites where I updated the Sourcerer recently.

The dev release solves the issue.

Patrick
Pan D.'s Avatar Pan D.
Confirming as well. In joomla 5.1.1 dev release of Advanced module manager solves the problem

cheers

Pan
Marc's Avatar Marc
Confirming. I simply installed the DEV version of Extension Manager (so that I am sure it does not interfere since this is a pure backend thing)
Peter van Westen's Avatar Peter van Westen ADMIN
The new version has been released.
Please post a rating at the Joomla! Extensions Directory
You can only post on this forum if you log in