Cannot use object of type stdClass as array after update Topic is solved

Everything to do with Joomla! 3.x templates and templating.

Moderator: General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Locked
ghooton-ue
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Jun 27, 2018 7:40 am

Cannot use object of type stdClass as array after update

Post by ghooton-ue » Wed Jun 27, 2018 7:50 am

After updating to 3.8.9 I get the error "Cannot use object of type stdClass as array" when I try to edit a menu item. I have a few Joomla sites and this only affects one on them so it's not a general bug with the update. Can someone give me some guide as to how to debug. Is there a way of getting a more detailed error message?

gws
Joomla! Champion
Joomla! Champion
Posts: 5951
Joined: Tue Aug 23, 2005 1:56 pm
Location: South coast, UK
Contact:

Re: Cannot use object of type stdClass as array after update

Post by gws » Wed Jun 27, 2018 8:14 am

update to 3.8.10 and see if you still have the issue.

ghooton-ue
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Jun 27, 2018 7:40 am

Re: Cannot use object of type stdClass as array after update

Post by ghooton-ue » Wed Jun 27, 2018 8:23 am

Done that, no change.

wojsmol
Joomla! Explorer
Joomla! Explorer
Posts: 475
Joined: Fri Jul 24, 2009 8:18 am

Re: Cannot use object of type stdClass as array after update

Post by wojsmol » Wed Jun 27, 2018 8:25 am

Hi all
Please post viewtopic.php?f=714&t=793531 results.

ghooton-ue
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Jun 27, 2018 7:40 am

Re: Cannot use object of type stdClass as array after update -FIXED

Post by ghooton-ue » Wed Jun 27, 2018 9:26 am

I found out how to get more debug info and I now get a reference to "plugins/system/helix3/helix3.php:55"
I removed helix3 framework and that fixed my problem.

KEComm
Joomla! Apprentice
Joomla! Apprentice
Posts: 41
Joined: Thu Jan 21, 2016 9:45 am

Re: Cannot use object of type stdClass as array after update

Post by KEComm » Wed Jun 27, 2018 12:29 pm

Updating HELIX Framework solved my issue!

simpleweb
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Jun 27, 2018 1:59 pm

Re: Cannot use object of type stdClass as array after update

Post by simpleweb » Wed Jun 27, 2018 2:05 pm

I'm on latest 3.8.10 and i don't use HELIX 3. I have this problem. Where i have to search to find the problem?
Thanks

ghooton-ue
Joomla! Fledgling
Joomla! Fledgling
Posts: 4
Joined: Wed Jun 27, 2018 7:40 am

Re: Cannot use object of type stdClass as array after update

Post by ghooton-ue » Wed Jun 27, 2018 2:46 pm

Try like I did, turn on debug :-
System-->Global Configuration-->System
change Debug System to Yes

deleted user

Re: Cannot use object of type stdClass as array after update

Post by deleted user » Wed Jun 27, 2018 3:17 pm

Does anyone check the issue tracker for bug reports?

https://github.com/joomla/joomla-cms/issues/20879

simpleweb
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Wed Jun 27, 2018 1:59 pm

Re: Cannot use object of type stdClass as array after update

Post by simpleweb » Wed Jun 27, 2018 3:25 pm

ghooton-ue wrote:Try like I did, turn on debug :-
System-->Global Configuration-->System
change Debug System to Yes
Ok i have found the problem: is the plugin Google Structured Data but is not available a new versione. Any idea on how can i fix myself?

Thanks

User avatar
Tazzoz
Joomla! Apprentice
Joomla! Apprentice
Posts: 7
Joined: Tue May 19, 2009 9:44 am
Location: Kos Greece
Contact:

Re: Cannot use object of type stdClass as array after update

Post by Tazzoz » Thu Jun 28, 2018 6:37 am

A new version of Google Structured Data extension released which addresses this issue.
https://extensions.joomla.org/extension ... ta-markup/
Last edited by toivo on Mon Jul 02, 2018 6:41 pm, edited 2 times in total.
Reason: mod note: added signature back
Lead Developer at Tassos.gr

Add Schema Structured Markup for Better Joomla SEO. https://www.tassos.gr/joomla-extensions ... ata-markup

pozyczkabez
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Jun 28, 2018 11:25 am

Re: Cannot use object of type stdClass as array after update

Post by pozyczkabez » Thu Jun 28, 2018 12:26 pm

I'm on latest 3.8.10 and i don't use HELIX 3. I have this problem too.
Where I have to search to find the problem?

wojsmol
Joomla! Explorer
Joomla! Explorer
Posts: 475
Joined: Fri Jul 24, 2009 8:18 am

Re: Cannot use object of type stdClass as array after update

Post by wojsmol » Thu Jun 28, 2018 12:52 pm

Hi pozyczkabez
System-->Global Configuration-->System change Debug System to Yes and the reproduce the error and post it.

pozyczkabez
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Thu Jun 28, 2018 11:25 am

Re: Cannot use object of type stdClass as array after update

Post by pozyczkabez » Thu Jun 28, 2018 12:59 pm

wojsmol wrote:Hi pozyczkabez
System-->Global Configuration-->System change Debug System to Yes and the reproduce the error and post it.
When Debug Mode is ON /backend/ is OFF.

wojsmol
Joomla! Explorer
Joomla! Explorer
Posts: 475
Joined: Fri Jul 24, 2009 8:18 am

Re: Cannot use object of type stdClass as array after update

Post by wojsmol » Thu Jun 28, 2018 1:06 pm

Hi pozyczkabez
Then in configuratio.php chenge $error_reporting='maximum' and post the error.

garikello
Joomla! Apprentice
Joomla! Apprentice
Posts: 31
Joined: Tue Jan 30, 2007 11:14 pm
Location: Aizkraukle, Latvia

Re: Cannot use object of type stdClass as array after update

Post by garikello » Sat Jun 30, 2018 11:27 pm

I have the same error on new website with latest updates, it is not live...

Cannot use object of type stdClass as array
/home/datevlv/public_html/latius.lv/plugins/system/vpframework/helper.php:1087
Tā nu tas ir...

wojsmol
Joomla! Explorer
Joomla! Explorer
Posts: 475
Joined: Fri Jul 24, 2009 8:18 am

Re: Cannot use object of type stdClass as array after update

Post by wojsmol » Sat Jun 30, 2018 11:46 pm

Hi garikello
The vpframework system plugin needs updating, because of regression in Joomla! core code - see https://github.com/joomla/joomla-cms/issues/20879 for details.

SamMG
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Jul 02, 2018 12:34 pm

Re: Cannot use object of type stdClass as array after update

Post by SamMG » Mon Jul 02, 2018 12:38 pm

I am having the same issues as above with the vpframework/helper.php

Can anyone provide any help? I have tried the link that @wojsmol submitted and still having issues.

wojsmol
Joomla! Explorer
Joomla! Explorer
Posts: 475
Joined: Fri Jul 24, 2009 8:18 am

Re: Cannot use object of type stdClass as array after update

Post by wojsmol » Mon Jul 02, 2018 12:48 pm

Hi SamMG
Please contact plugin authors for support. As I wrote above this plugin needs updating, because of regression in Joomla! core code.

pilip
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Thu Jul 05, 2018 10:52 am

Re: Cannot use object of type stdClass as array after update

Post by pilip » Thu Jul 05, 2018 10:59 am

To fix Problem go to "plugins\content\vpadvanceduser\vpadvanceduser.php" at line 122.
Find the above code:
$request = isset($data['request']) ? (array) $data['request'] : array();

and replace it with :

$request = isset($data->request) ? (array) $data->request : array();

User avatar
davemass
Joomla! Apprentice
Joomla! Apprentice
Posts: 23
Joined: Sun Mar 06, 2011 9:25 pm
Contact:

Re: Cannot use object of type stdClass as array after update

Post by davemass » Thu Jul 05, 2018 4:40 pm

Hello everybody, I played the "turn off/on plugins and check if it works" game until I found the one plugin that was causing the problem for my site specifically. it'ds the plugin System - Extra Menu Params from Smartaddons YouTech.
Ware Hosting

diacotm
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Mon Jul 09, 2018 1:17 pm

Re: Cannot use object of type stdClass as array after update

Post by diacotm » Mon Jul 09, 2018 1:22 pm

Hi,
i got same problem and this help me out,
https://www.smartaddons.com/forum/558-s ... s-as-array

take care

SamMG
Joomla! Fledgling
Joomla! Fledgling
Posts: 2
Joined: Mon Jul 02, 2018 12:34 pm

Re: Cannot use object of type stdClass as array after update

Post by SamMG » Tue Jul 10, 2018 3:30 pm

pilip wrote:To fix Problem go to "plugins\content\vpadvanceduser\vpadvanceduser.php" at line 122.
Find the above code:
$request = isset($data['request']) ? (array) $data['request'] : array();

and replace it with :

$request = isset($data->request) ? (array) $data->request : array();
Thanks this worked for me:)

seoserviceskc
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jul 10, 2018 8:04 pm

Re: Cannot use object of type stdClass as array after update

Post by seoserviceskc » Tue Jul 10, 2018 8:37 pm

SamMG that "$request = isset($data->request) ? (array) $data->request : array();" replacement worked for me also. Appreciate you sharing it!

nikolay100
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sun Nov 21, 2010 10:14 am

Re: Cannot use object of type stdClass as array after update

Post by nikolay100 » Thu Nov 22, 2018 11:14 am

Hi,
I have the same problem. Here is the information from the debug:

Code: Select all

**An error has occurred.**

    0 Cannot use object of type stdClass as array
    /home/nikolay100/public_html/plugins/system/yjsg/yjsg.php:1129 

Call stack
# 	Function 	Location
1 	() 	JROOT/plugins/system/yjsg/yjsg.php:1129
2 	plgSystemYjsg->onContentPrepareForm() 	JROOT/libraries/joomla/event/event.php:70
3 	JEvent->update() 	JROOT/libraries/joomla/event/dispatcher.php:160
4 	JEventDispatcher->trigger() 	JROOT/libraries/src/MVC/Model/FormModel.php:321
5 	Joomla\CMS\MVC\Model\FormModel->preprocessForm() 	JROOT/administrator/components/com_menus/models/item.php:1255
6 	MenusModelItem->preprocessForm() 	JROOT/libraries/src/MVC/Model/FormModel.php:242
7 	Joomla\CMS\MVC\Model\FormModel->loadForm() 	JROOT/administrator/components/com_menus/models/item.php:552
8 	MenusModelItem->getForm() 	JROOT/libraries/src/MVC/View/HtmlView.php:425
9 	Joomla\CMS\MVC\View\HtmlView->get() 	JROOT/administrator/components/com_menus/views/item/view.html.php:58
10 	MenusViewItem->display() 	JROOT/libraries/src/MVC/Controller/BaseController.php:672
11 	Joomla\CMS\MVC\Controller\BaseController->display() 	JROOT/administrator/components/com_menus/controller.php:75
12 	MenusController->display() 	JROOT/libraries/src/MVC/Controller/BaseController.php:710
13 	Joomla\CMS\MVC\Controller\BaseController->execute() 	JROOT/administrator/components/com_menus/menus.php:18
14 	require_once() 	JROOT/libraries/src/Component/ComponentHelper.php:402
15 	Joomla\CMS\Component\ComponentHelper::executeComponent() 	JROOT/libraries/src/Component/ComponentHelper.php:377
16 	Joomla\CMS\Component\ComponentHelper::renderComponent() 	JROOT/libraries/src/Application/AdministratorApplication.php:101
17 	Joomla\CMS\Application\AdministratorApplication->dispatch() 	JROOT/libraries/src/Application/AdministratorApplication.php:159
18 	Joomla\CMS\Application\AdministratorApplication->doExecute() 	JROOT/libraries/src/Application/CMSApplication.php:196
19 	Joomla\CMS\Application\CMSApplication->execute() 	JROOT/administrator/index.php:51 
This happened after update to version 3.9.0.
Could you please help find where is the problem and how to fix it?
Thank you in advance.
Капката не пробива камъка със сила, а с упоритост.
http://nikolay100.com/

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 17443
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: Cannot use object of type stdClass as array after update

Post by toivo » Thu Nov 22, 2018 12:43 pm

@nikolay100 - the YJSG plugin probably used by your template is out of date:
https://www.youjoomla.com/joomla_suppor ... hp?t=16286
Toivo Talikka, Global Moderator

nikolay100
Joomla! Apprentice
Joomla! Apprentice
Posts: 10
Joined: Sun Nov 21, 2010 10:14 am

Re: Cannot use object of type stdClass as array after update

Post by nikolay100 » Thu Nov 22, 2018 2:09 pm

Yes, as soon as I posted here I realized that probably the YJSG framework needs to be updated. I updated it and it fixed the problem.
Thanks
Капката не пробива камъка със сила, а с упоритост.
http://nikolay100.com/

campodiseno-1
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Wed Feb 13, 2019 4:17 am

Re: Cannot use object of type stdClass as array after update

Post by campodiseno-1 » Wed Feb 13, 2019 5:12 pm

I made the recommendations in the comments because I had the same problem, but they did not work. I found the definitive solution in
https://ltheme.com/helix-menu-problem-a ... la-3-8-10/
This action solved everything.

You also can fix it by open the following file ‘/plugins/system/helix3/helix3.php’, go o line 49 you will see PHP code

JForm::addFormPath(JPATH_PLUGINS.’/system/helix3/params’);

just replace it to

JForm::addFormPath(JPATH_PLUGINS.’/system/helix3/params’);
if (is_object($data)) {
$data = (array)$data;
}

iraktzig
Joomla! Fledgling
Joomla! Fledgling
Posts: 1
Joined: Tue Jan 28, 2020 9:02 am

Re: Cannot use object of type stdClass as array after update

Post by iraktzig » Tue Jan 28, 2020 9:04 am

I have this problem an i cant make a new menu item. :'( :'(
Any help?



An error has occurred.
0 Cannot use object of type stdClass as array
/var/www/vhosts/eshopfairytale.gr/httpdocs/plugins/system/vpframework/helper.php:928
Call stack
# Function Location
1 () JROOT/plugins/system/vpframework/helper.php:928
2 plgSystemVPFrameworkHelper->addParamsToAdminForms() JROOT/plugins/system/vpframework/vpframework.php:203
3 plgSystemVPFramework->onContentPrepareForm() JROOT/libraries/joomla/event/event.php:70
4 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
5 JEventDispatcher->trigger() JROOT/libraries/src/MVC/Model/FormModel.php:321
6 Joomla\CMS\MVC\Model\FormModel->preprocessForm() JROOT/administrator/components/com_menus/models/item.php:1255
7 MenusModelItem->preprocessForm() JROOT/libraries/src/MVC/Model/FormModel.php:242
8 Joomla\CMS\MVC\Model\FormModel->loadForm() JROOT/administrator/components/com_menus/models/item.php:552
9 MenusModelItem->getForm() JROOT/libraries/src/MVC/View/HtmlView.php:425
10 Joomla\CMS\MVC\View\HtmlView->get() JROOT/administrator/components/com_menus/views/item/view.html.php:58
11 MenusViewItem->display() JROOT/libraries/src/MVC/Controller/BaseController.php:672
12 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/administrator/components/com_menus/controller.php:75
13 MenusController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:710
14 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/administrator/components/com_menus/menus.php:18
15 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
16 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
17 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/AdministratorApplication.php:101
18 Joomla\CMS\Application\AdministratorApplication->dispatch() JROOT/libraries/src/Application/AdministratorApplication.php:159
19 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:196
20 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/index.php:51


Locked

Return to “Templates for Joomla! 3.x”