Bug #91773
closedinsufficient check in CacheManager::createAllCaches()
100%
Description
Preface:
This bug occurs when using a proxy-class in context and as extension for georgringer/news.
The bug can be resolved by changing a single line.
The bug is also explained on https://github.com/georgringer/news/issues/1301.
Description:
Debugging the array TYPO3\CMS\Core\Cache\CacheManager->cacheConfigurations there is a sub-array without key, which drives the whole backend unusable if triggered:
$cacheConfigurations => array(17 items) core => array(4 items) hash => array(4 items) pages => array(4 items) pagesection => array(4 items) runtime => array(4 items) rootline => array(4 items) imagesizes => array(4 items) assets => array(4 items) l10n => array(4 items) fluid_template => array(3 items) extbase => array(4 items) adminpanel_requestcache => array(empty) rx_shariff => array(4 items) news => array(4 items) '' => array(1 item) groups => array(2 items) 0 => 'pages' (5 chars) 1 => 'all' (3 chars) static_info_tables => array(3 items) news_category => array(1 item)
In my case the sub-array includes useless and needless details and can be omitted completely.
Changing one line in CacheManager::createAllCaches() solves the issue in my case:
if (!isset($this->caches[$identifier])) { $this->createCache($identifier); }
to this:
if ($identifier && !isset($this->caches[$identifier])) { $this->createCache($identifier); }
The situation when the error is triggered is not completely clear for me but I remarked that after a composer-update it's showing up.
To get rid of the error it's required to remove Extension-Configuration manually from LocalConfiguration.php even after having deinstalled my extension and news, but this is neither suitable nor a reliable solution.
Updated by Simon Gilli over 4 years ago
- Related to Bug #91959: Adding a cache configuration with empty identifiers leads to later issues added
Updated by Gerrit Code Review over 4 years ago
- Status changed from New to Under Review
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65229
Updated by Gerrit Code Review over 4 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/65254
Updated by Simon Gilli over 4 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 688425e84aa4d588e055d4629b1006b6240428d0.
Updated by David Bruchmann about 4 years ago
Actually the solution never solved anything for me as my extension was still unusable.
Nevertheless I was forced to verify the used extensions and was able to find the fault in one of them.
The description can be found in the error-related wiki-page:
https://wiki.typo3.org/Exception/CMS/1596980032