Keyword

Errors after Update to PHP8 in Backend

  • Hermann
  • Hermann's Avatar Topic Author
  • Offline
  • New Member
More
3 months 1 week ago #180449 by Hermann
Errors after Update to PHP8 was created by Hermann
Hi, we get the following error messages when calling up a K2 category link.
Runs under Joomla 3.10.11 with PHP 8.0.24 and K2 2.10.3.
Strangely enough, the module works, but not the direct link to a category.
No HTML overrides.

Here the debug-Info... any idea?

Regards
Hermann


0
Serialization of 'Closure' is not allowed

Startseite
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:664
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:702
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:225
15    Joomla\CMS\Application\CMSApplication->execute()    JROOT/index.php:49

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #180454 by Okan
Replied by Okan on topic Errors after Update to PHP8
Try to update K2 to dev version.
getk2.org/downloads/?f=dev

But before that get a backup

Please Log in or Create an account to join the conversation.

  • Hermann
  • Hermann's Avatar Topic Author
  • Offline
  • New Member
More
3 months 1 week ago #180455 by Hermann
Replied by Hermann on topic Errors after Update to PHP8
Hi, thanks for the suggestion. I tried it, but the same result... "Serialization of 'Closure' is not allowed"
Runs now under Joomla 3.10.11 with PHP 8.0.24 and K2 v2.11.0 [Build 20220701]



0
Serialization of 'Closure' is not allowed

Startseite
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:691
5 K2ViewItemlist->display() JROOT/libraries/src/MVC/Controller/BaseController.php:664
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:702
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:225
15 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #180456 by Okan
Replied by Okan on topic Errors after Update to PHP8
I am sorry to offer without checking properly your question.
Not only K2 also Joomla's it self gives error too.

It might happen because of PHP version.
Can you update it to 8.1.0 or 8.1.11 and try again?

Please Log in or Create an account to join the conversation.

  • Hermann
  • Hermann's Avatar Topic Author
  • Offline
  • New Member
More
3 months 1 week ago #180457 by Hermann
Replied by Hermann on topic Errors after Update to PHP8
I changed PHP version to 8.1.11.
Unfortunately, the same result.
Runs now under Joomla 3.10.11 with PHP 8.1.11 and K2 v2.11.0 [Build 20220701]


0
Serialization of 'Closure' 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:691
5 K2ViewItemlist->display() JROOT/libraries/src/MVC/Controller/BaseController.php:664
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:702
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:225
15 Joomla\CMS\Application\CMSApplication->execute() JROOT/index.php:49

Please Log in or Create an account to join the conversation.

More
3 months 1 week ago #180458 by Okan
Replied by Okan on topic Errors after Update to PHP8
Can you create "test" folder and upload fresh joomla and than install k2 dev version on it?
Than try it if it gives still error or not.

Here are links for you
downloads.joomla.org/cms/joomla3/3-10-11/Joomla_3-10-11-Stable-Full_Package.zip?format=zip
getk2.org/downloads/?f=dev

Test it before and after k2 installation

Please Log in or Create an account to join the conversation.

  • Hermann
  • Hermann's Avatar Topic Author
  • Offline
  • New Member
More
3 months 1 week ago #180461 by Hermann
Replied by Hermann on topic Errors after Update to PHP8 in Backend
Hi, there is also an error in the backend, even there you can no longer access the categories.
Runs under Joomla 3.10.11 with PHP 8.1.11 and K2 v2.11.0 [Build 20220701]
Call to administrator/index.php?option=com_k2&view=categories shows error:


Es ist ein Fehler aufgetreten!
0 Undefined constant "JPATH_COMPONENT"
/is/htdocs/wp12061966_ZGSRABJT12/www2/cms22/plugins/k2/incptvk2multiplecategories/models/category.php:15
Call stack
# Function Location
1 () JROOT/plugins/k2/incptvk2multiplecategories/models/category.php:15
2 include_once() JROOT/libraries/loader.php:226
3 JLoader::import() JROOT/plugins/system/incptvk2multiplecategories/incptvk2multiplecategories.php:24
4 plgSystemIncptvk2multiplecategories->onAfterRoute() JROOT/libraries/joomla/event/event.php:70
5 JEvent->update() JROOT/libraries/joomla/event/dispatcher.php:160
6 JEventDispatcher->trigger() JROOT/libraries/src/Application/BaseApplication.php:108
7 Joomla\CMS\Application\BaseApplication->triggerEvent() JROOT/libraries/src/Application/AdministratorApplication.php:478
8 Joomla\CMS\Application\AdministratorApplication->route() JROOT/libraries/src/Application/AdministratorApplication.php:144
9 Joomla\CMS\Application\AdministratorApplication->doExecute() JROOT/libraries/src/Application/CMSApplication.php:225
10 Joomla\CMS\Application\CMSApplication->execute() JROOT/administrator/index.php:51

Please Log in or Create an account to join the conversation.

More
2 weeks 8 hours ago - 2 weeks 8 hours ago #180688 by Sambroza
Replied by Sambroza on topic Errors after Update to PHP8 in Backend
Same issue here - after upgrading to PHP8.

0 Serialization of 'Closure' is not allowed
Call stack
# Function - Location
1 () - JROOT/libraries/src/Cache/Controller/:188
2 serialize() - JROOT/libraries/src/Cache/Controller/:188
3 Joomla\CMS\Cache\Controller\CallbackController->get() - JROOT/libraries/src/Cache/Controller/:45
4 Joomla\CMS\Cache\Controller\CallbackController->call() - JROOT/components/com_k2/views/itemlist/:691

But it occurs only when Joomla Debug is enabled.

*Extra info: 
I got the above on the localhost dev site.
Once I tried the same on an online dev - Joomla returns this: 

Something on your site is broken and tries to save the plugin state in the cache. This is a major security issue and will cause your site to not work properly. Go to your site's backend, Global Configuration and set Caching to OFF as a temporary solution. Possible causes: older versions of JoomlaShine templates, JomSocial, BetterPreview and other third party Joomla! extensions.
Last edit: 2 weeks 8 hours ago by Sambroza.

Please Log in or Create an account to join the conversation.

More
1 week 6 days ago #180690 by JoomlaWorks
Replied by JoomlaWorks on topic Errors after Update to PHP8 in Backend
First off, I doubt the message you got on the live site comes from Joomla, it must be some security plugin or service.

Secondly, the previous poster's issue was a third-party plugin (incptvk2multiplecategories), not K2.

I'm guessing the issue is probably similar with your site as well. You need to double check your system plugins as that plugin type can execute automatically anywhere in Joomla.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum