16 Posts
Toadie
3 months ago
4
Topic

Since the upgrade to Joomla 4 and Seblod 4.2.1 I now get this error when I open a Seblod post.

What could be the cause?

Error occurs in the backend

0 Cannot use object of type stdClass as array
Call stack
# Function Location
1 () JROOT/plugins/cck_storage_location/joomla_article/classes/helper.php:31
2 plgCCK_Storage_LocationJoomla_Article_Helper::getAssociationsForm() JROOT/libraries/cck/_/cck.php:35
3 JCck::callFunc_Array() JROOT/plugins/cck_field/jform_associations/jform_associations.php:84
4 plgCCK_FieldJform_Associations->onCCK_FieldPrepareForm() JROOT/libraries/src/Plugin/CMSPlugin.php:289
5 Joomla\CMS\Plugin\CMSPlugin->Joomla\CMS\Plugin\{closure}() JROOT/libraries/vendor/joomla/event/src/Dispatcher.php:486
6 Joomla\Event\Dispatcher->dispatch() JROOT/libraries/src/Application/EventAware.php:111
7 Joomla\CMS\Application\WebApplication->triggerEvent() JROOT/libraries/cck/base/form/form_inc.php:312
8 include_once() JROOT/administrator/components/com_cck/views/form/view.html.php:70
9 CCKViewForm->prepareDisplay() JROOT/administrator/components/com_cck/views/form/view.html.php:40
10 CCKViewForm->display() JROOT/libraries/src/MVC/Controller/BaseController.php:660
11 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_cck/controller.php:318
12 CCKController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:693
13 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_cck/cck.php:34
14 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
15 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher\{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:73
16 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:361
17 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:143
18 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:186
19 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:293
20 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/includes/app.php:61
21 require_once() JROOT/administrator/index.php:32
Get a Book for SEBLOD
3 months ago
0
Level 1

Hi Toadie,

We're going to check this issue and we'll come back to you asap.

Regards,

Olivier

3 months ago
2
Level 1

Hi Toadie,

Quickl fix for now in file /plugins/cck_storage_location/joomla_article/classes/helper.php :

Add this new line at #30 :

$config=(array) $config;

So ;

$languages=JLanguageHelper::getLanguages( 'lang_code' );
foreach ( $languages as $tag=>$language ) {

becomes:

$languages=JLanguageHelper::getLanguages( 'lang_code' );
$config=(array) $config;
foreach ( $languages as $tag=>$language ) {


An official fix to be pushed to Github soon.

16 Posts
Toadie
3 months ago
1
Level 2

Thanks. Its working

3 months ago
0
Level 3

Hi Toadie,

We found the root cause, and applied another fix.

Available at Github for now, and will be included in an upcoming SEBLOD 4 package:

You can rollback my previous fix change

Feel free to confirm.
Thank you.

Get a Book for SEBLOD