count(): Argument #1 ($value) must be of type Countable|array, stdClass given - Forum | JoomShaper
Awaiting an answer SP Page Builder

count(): Argument #1 ($value) must be of type Countable|array, stdClass given

Asked by Hawaiipacificparks 3 years ago Last activity 3 years ago

Gettin the following error while trying to edit two pages on our site, all other pages open and edit fine.
Here are the specs
Joomla 4.1.4
Shaper_educon 4.0.1
PHP 8.1
Sp Page Builder 4.0.11

Getting error 0
count(): Argument #1 ($value) must be of type Countable|array, stdClass given

Truned on more logging and here are the detailed results.
count(): Argument #1 ($value) must be of type Countable|array, stdClass given

Call stack

Function Location

1 () JROOT/templates/shaper_educon/sppagebuilder/addons/tweet/site.php:44
2 SppagebuilderAddonTweet->render() JROOT/components/com_sppagebuilder/builder/classes/addon.php:401
3 SpPageBuilderAddonHelper::getAddonContent() JROOT/components/com_sppagebuilder/builder/classes/addon.php:248
4 SpPageBuilderAddonHelper::getFontendEditingPage() JROOT/components/com_sppagebuilder/builder/classes/addon.php:118
5 SpPageBuilderAddonHelper::__() JROOT/components/com_sppagebuilder/views/form/tmpl/edit.php:82
6 include() JROOT/libraries/src/MVC/View/HtmlView.php:436
7 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:220
8 Joomla\CMS\MVC\View\HtmlView->display() JROOT/components/com_sppagebuilder/views/form/view.html.php:70
9 SppagebuilderViewForm->display() JROOT/libraries/src/MVC/Controller/BaseController.php:697
10 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_sppagebuilder/controller.php:80
11 SppagebuilderController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:735
12 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_sppagebuilder/sppagebuilder.php:26
13 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:69
14 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
15 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:389
16 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:204
17 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:243
18 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:278
19 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:63
20 require_once() JROOT/index.php:32.

2 replies

Rashida Rahman Staff

Hi there!

Sorry for your issue.

Would you please downgrade your PHP version to PHP 7.4 for now? The Educon template is not compatible with PHP 8.x yet, really sorry about that. But it will get compatibility update soon.

Let me know if it helps!

Best Regards

Hawaiipacificparks Asked this

Hello,
I did change the PHP to 7.4 and received this error.
I have tried to go to PHP 7 and get the same error.
Again, this error is only happening on to pages while trying to edit, all other pages open and edit fine.
Problem is its our Home page and Contact US pages.

CANNOT USE OBJECT OF TYPE STDCLASS AS ARRAY
CALL STACK

Function Location

1 () JROOT/templates/shaper_educon/sppagebuilder/addons/tweet/site.php:60
2 SppagebuilderAddonTweet->render() JROOT/components/com_sppagebuilder/builder/classes/addon.php:401
3 SpPageBuilderAddonHelper::getAddonContent() JROOT/components/com_sppagebuilder/builder/classes/addon.php:248
4 SpPageBuilderAddonHelper::getFontendEditingPage() JROOT/components/com_sppagebuilder/builder/classes/addon.php:118
5 SpPageBuilderAddonHelper::__() JROOT/components/com_sppagebuilder/views/form/tmpl/edit.php:82
6 include() JROOT/libraries/src/MVC/View/HtmlView.php:436
7 Joomla\CMS\MVC\View\HtmlView->loadTemplate() JROOT/libraries/src/MVC/View/HtmlView.php:220
8 Joomla\CMS\MVC\View\HtmlView->display() JROOT/components/com_sppagebuilder/views/form/view.html.php:70
9 SppagebuilderViewForm->display() JROOT/libraries/src/MVC/Controller/BaseController.php:697
10 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_sppagebuilder/controller.php:80
11 SppagebuilderController->display() JROOT/libraries/src/MVC/Controller/BaseController.php:735
12 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_sppagebuilder/sppagebuilder.php:26
13 require_once() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:69
14 Joomla\CMS\Dispatcher\LegacyComponentDispatcher::Joomla\CMS\Dispatcher{closure}() JROOT/libraries/src/Dispatcher/LegacyComponentDispatcher.php:71
15 Joomla\CMS\Dispatcher\LegacyComponentDispatcher->dispatch() JROOT/libraries/src/Component/ComponentHelper.php:389
16 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:204
17 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:243
18 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:278
19 Joomla\CMS\Application\CMSApplication->execute() JROOT/includes/app.php:63
20 require_once() JROOT/index.php:32

Log in to reply.