Actions
Bug #88975
closedException when using CacheManager in "extTablesInclusion-PostProcessing" Hook
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Caching
Target version:
-
Start date:
2019-08-19
Due date:
% Done:
0%
Estimated time:
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
- Register Hook in ext_localconf.php:
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['GLOBAL']['extTablesInclusion-PostProcessing'][] = \My\Custom\Hooks\ExtTablesPostProcessing::class;
- 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 - Go to the Maintenance Module and try opening "Analyze Database Structure"
Thanks!
best,
Ramón
Actions