Issue Bug Closed

#88975Exception when using CacheManager in "extTablesInclusion-PostProcessing" Hook

Ramón Schlosser 08/19/19, 11:08 updated 01/09/20, 15:32

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;
  1. 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
  2. Go to the Maintenance Module and try opening “Analyze Database Structure”

Thanks!

best,
Ramón

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.