Displaying list of categories.
Error 500: Serialization of 'Closure' is not allowed
The bug is present in prod 4.2.2 and 4.2.3-dev
The bug was not present in 4.1.5 version.
Labels |
Removed:
?
|
Labels |
Added:
No Code Attached Yet
|
Confirm also, in joomla 4.2.2 (php 8)
I have a blank page with a mod_articles_categories (No error message on my side even if error is enable, just blank page)
If, in advanced Tab option of the module mod_articles_categories, Caching, i enter "No Caching"
I can load my page without issue
+1
Confirmed for J4.2.3 stable, PHP 8.1
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2022-10-13 06:54:50 |
Closed_By | ⇒ | alikon |
Status | Closed | ⇒ | New |
Closed_Date | 2022-10-13 06:54:50 | ⇒ | |
Closed_By | alikon | ⇒ |
Will this B/C break be mitigated?
Confirm this buq still exist. Joomla 4.2.5 and PHP 8
Serialization of 'Closure' is not allowed
/public_html/libraries/src/Cache/Controller/CallbackController.php:156
Labels |
Added:
bug
|
Bug present on Joomla 4.2.9 too.
Will there be a solution, because not use cache is not a solution ?!
The bug still persists in version 4.2.9
I think there is information that they will fix this problem in version 4.3.0
Until we fix this issue in version 4.3.0 the workaround is to disable cache in articles-categories module
@joomdonation Will do by Monday, please hold on.
@joomdonation The issue is unrelated, it's invalid module code: module helper caches array of Joomla\CMS\Categories\CategoryNode
objects and each object has _constructor
property of Joomla\Component\Content\Site\Service\Category
type which can't be serialized because it contains database layer instance and other garbage.
Joomla\Module\ArticlesCategories\Site\Helper\ArticlesCategoriesHelper::getList()
should just return array of simple stdClasses
The issue raised after Jun 18, 2022 via injecting database instance into Categories (via DatabaseAwareTrait
) which are stored in node as _constructor
property.
The module cache should not serialize database layer, it's ridiculous and just impossible because layer contains non-serialazable objects like i.e. PDOStatement
.
Here is this commit:
26c6341
I can do a PR and change the mod_articles_categories cached data to simple stdClass
, but only if this PR will be actually merged but not hang around for months/years like other PRs :(
Many thanks for your help, I will add a PR by the end of Monday, hope tomorrow, please hold on...
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-04-01 15:53:51 |
Closed_By | ⇒ | joomdonation |
@Sabrina-Travail-Lewagon @Vegaturk Please test PR #40275 . It should solve your issue. Thanks !
I have installed version 4.3.0 with great hope that the error can be fixed, I disabled the caching of the module, I turned on caching again, but unfortunately the error persists.
0 Serialization of 'Closure' is not allowed
Sure, the patch was not merged into 4.3.0, I guess we can wait for a year.
confirmed probably regression from #37139