Bug #88975
closedException when using CacheManager in "extTablesInclusion-PostProcessing" Hook
0%
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
Updated by Ramón Schlosser about 5 years 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
Steps to Reproduce:
PHP: 7.3
- Register Hook in ext_localconf.php:
[...]- 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
Looks like this has been solved with v10.1.0
Updated by Benni Mack almost 5 years ago
- Status changed from New to Closed
Thanks for the report and the update on the change!