?
avatar Joomlakonsulenten
Joomlakonsulenten
3 Jun 2020

screen shot 2020-06-03 at 10 11 32### 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.

Actual result

System information (as much as possible)

Joomla 3.9.19
K2 v2.10.3
PHP 7.3

Additional comments

avatar Joomlakonsulenten Joomlakonsulenten - open - 3 Jun 2020
avatar joomla-cms-bot joomla-cms-bot - labeled - 3 Jun 2020
avatar SharkyKZ
SharkyKZ - comment - 3 Jun 2020

This should be reported to K2 developers https://github.com/getk2/k2. Closing as non-core issue.

avatar SharkyKZ SharkyKZ - change - 3 Jun 2020
Status New Closed
Closed_Date 0000-00-00 00:00:00 2020-06-03 10:28:12
Closed_By SharkyKZ
avatar SharkyKZ SharkyKZ - close - 3 Jun 2020

Add a Comment

Login with GitHub to post a comment