Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#0 Serialization of 'SimpleXMLElement' is not allowed #527

Closed
Joomlakonsulenten opened this issue Jun 3, 2020 · 1 comment
Closed

#0 Serialization of 'SimpleXMLElement' is not allowed #527

Joomlakonsulenten opened this issue Jun 3, 2020 · 1 comment

Comments

@Joomlakonsulenten
Copy link

### Steps to reproduce the issue
Upgraded to Joomla 3.9.18 and got this error on a K2 Category view page:


#0 Serialization of 'SimpleXMLElement' is not allowed

Call stack

Function Location
1 () JROOT/libraries/src/Cache/Controller/CallbackController.php:188
2 serialize() JROOT/libraries/src/Cache/Controller/CallbackController.php:188
3 Joomla\CMS\Cache\Controller\CallbackController->get() JROOT/libraries/src/Cache/Controller/CallbackController.php:45
4 Joomla\CMS\Cache\Controller\CallbackController->call() JROOT/components/com_k2/views/itemlist/view.html.php:678
5 K2ViewItemlist->display() JROOT/libraries/src/MVC/Controller/BaseController.php:672
6 Joomla\CMS\MVC\Controller\BaseController->display() JROOT/components/com_k2/controllers/controller.php:19
7 K2Controller->display() JROOT/components/com_k2/controllers/itemlist.php:49
8 K2ControllerItemlist->display() JROOT/libraries/src/MVC/Controller/BaseController.php:710
9 Joomla\CMS\MVC\Controller\BaseController->execute() JROOT/components/com_k2/k2.php:64
10 require_once() JROOT/libraries/src/Component/ComponentHelper.php:402
11 Joomla\CMS\Component\ComponentHelper::executeComponent() JROOT/libraries/src/Component/ComponentHelper.php:377
12 Joomla\CMS\Component\ComponentHelper::renderComponent() JROOT/libraries/src/Application/SiteApplication.php:194
13 Joomla\CMS\Application\SiteApplication->dispatch() JROOT/libraries/src/Application/SiteApplication.php:233
14 Joomla\CMS\Application\SiteApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:196
15 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49


In a comment of @creativeideashun in this thread I found a fix that made the page work again: https://issues.joomla.org/tracker/joomla-cms/18130

The fix:
/public_html/libraries/src/Cache/Controller/CallbackController.php

I changed from:
$this->cache->store(serialize($data), $id);

To:
$this->cache->store($data, $id);

I upgraded to Joomla 3.9.19 and the error was back.

Expected result
Showing K2 items for a K2 category.

System information
Joomla 3.9.19
K2 v2.10.3
PHP 7.3

@fevangelou
Copy link
Member

There is no such error in default K2 on latest any Joomla release.

This must be triggered by something else. Perhaps another plugin for K2 that overrides something.

Based on the link you referenced ("working FrontEnd extensions that using ajax and serialize method"), K2 does neither of these things by default.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants