TYPO3: The default controller for extension "X" and plugin "Y" can not be determined

85 views Asked by At

In my TYPO3 extension i have to use TYPO3\CMS\Extbase\Configuration\ConfigurationManager inside my Configuration/TCA/Overrides/tt_content.php (TYPO3 v11, PHP 8.1).

When i instantiate it there with GeneralUtility::makeInstance(ConfigurationManager::class) however, i always get 'The default controller for extension "X" and plugin "Y" can not be determined' on random third party plugins (not mine) after the initial page load when clearing the cache.

Everything is fine from there, but this error popping up all the time is kind of nerve wracking and i want to get rid of it.

If i do not access ConfigurationManager in that file, the error is gone, even if i clear the cache.

I guess it has something to do with the order in which classes get loaded, but i could not find any information in TYPO3's documentation, if one is allowed to use ConfigurationManager in that location or how one would access it correctly.

1

There are 1 answers

1
Garvin Hicking On

Maybe you could move your dynamic logic to the PSR-14 event instead? That one should have all the DI and could apply changes/overrides, too - without influencing the TCA caching behavior:

https://docs.typo3.org/m/typo3/reference-coreapi/11.5/en-us/ApiOverview/Events/Events/Core/Configuration/AfterTcaCompilationEvent.html