Bug #88975

Exception when using CacheManager in "extTablesInclusion-PostProcessing" Hook

Added by Ramón Schlosser 2 months ago. Updated 17 days ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2019-08-19
Due date:
% Done:

0%

TYPO3 Version:
10
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Hi,
don't know exactly if it's a bug or my mistake, but I get an exception when using the CacheManager Framework inside the extTablesInclusion-PostProcessing Hook. The following Exception occurs:

#1549446998 LogicException
TYPO3\CMS\Core\Cache\CacheManager can not be injected/instantiated during ext_localconf.php loading. Use lazy loading instead.

But technically the CacheManager isn’t initiated in ext_localconf.php since it’s initiated inside the extTablesInclusion-PostProcessing Hook. Or do I overlook something here?

TYPO3: 10.0.0
PHP: 7.3

Steps to Reproduce:
  1. Register Hook in ext_localconf.php:
    $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['extTablesInclusion-PostProcessing'][] = \My\Custom\Hooks\ExtTablesPostProcessing::class;
    
  2. Inside the processData() Method use the Caching Framework as described here:
    https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/CachingFramework/Developer/Index.html
  3. Go to the Maintenance Module and try opening "Analyze Database Structure"

Thanks!

best,
Ramón

History

#1 Updated by Ramón Schlosser 17 days ago

Ramón Schlosser wrote:

Hi,
don't know exactly if it's a bug or my mistake, but I get an exception when using the CacheManager Framework inside the extTablesInclusion-PostProcessing Hook. The following Exception occurs:

[...]

But technically the CacheManager isn’t initiated in ext_localconf.php since it’s initiated inside the extTablesInclusion-PostProcessing Hook. Or do I overlook something here?

TYPO3: 10.0.0
PHP: 7.3

Steps to Reproduce:
  1. Register Hook in ext_localconf.php:
    [...]
  2. Inside the processData() Method use the Caching Framework as described here:
    https://docs.typo3.org/m/typo3/reference-coreapi/master/en-us/ApiOverview/CachingFramework/Developer/Index.html
  3. Go to the Maintenance Module and try opening "Analyze Database Structure"

Thanks!

best,
Ramón

Looks like this has been solved with v10.1.0

Also available in: Atom PDF