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.