Project

General

Profile

Actions

Bug #88975

closed

Exception when using CacheManager in "extTablesInclusion-PostProcessing" Hook

Added by Ramón Schlosser over 4 years ago. Updated over 4 years ago.

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

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

Actions #1

Updated by Ramón Schlosser over 4 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
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

Actions #2

Updated by Benni Mack over 4 years ago

  • Status changed from New to Closed

Thanks for the report and the update on the change!

Actions

Also available in: Atom PDF