Project

General

Profile

Actions

Bug #91773

closed

insufficient check in CacheManager::createAllCaches()

Added by David Bruchmann over 4 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Start date:
2020-07-09
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #91959: Adding a cache configuration with empty identifiers leads to later issuesClosedSimon Gilli2020-08-09

Actions
Actions #1

Updated by Simon Gilli over 4 years ago

  • Related to Bug #91959: Adding a cache configuration with empty identifiers leads to later issues added
Actions #2

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

Actions #3

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

Actions #4

Updated by Simon Gilli over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #5

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

Actions #6

Updated by Benni Mack about 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF