Problem reproduced and located within a "faulty" extension providing an eID script.
Initialization of the TSFE:
/**
* Initializes TSFE and sets $GLOBALS['TSFE'].
*
* @return void
*/
protected function initTSFE() {
$GLOBALS['TSFE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
'TYPO3\\CMS\\Frontend\Controller\\TypoScriptFrontendController',
$GLOBALS['TYPO3_CONF_VARS'],
\TYPO3\CMS\Core\Utility\GeneralUtility::_GP('id'),
''
);
$GLOBALS['TSFE']->initFEuser();
$GLOBALS['TSFE']->checkAlternativeIdMethods();
$GLOBALS['TSFE']->determineId();
$GLOBALS['TSFE']->initTemplate();
$GLOBALS['TSFE']->getConfigArray();
// Get linkVars, absRefPrefix, etc
\TYPO3\CMS\Frontend\Page\PageGenerator::pagegenInit();
}
Warning is triggered with ->determineId()
since $GLOBALS['TCA']
is not set.
Problem may be solved by calling an internal bootstrap method, typically after the call to ->initFEuser()
(to use same ordering as in bootstrap):
$GLOBALS['TSFE']->initFEuser();
\TYPO3\CMS\Core\Core\Bootstrap::getInstance()->loadCachedTca();
$GLOBALS['TSFE']->checkAlternativeIdMethods();
$GLOBALS['TSFE']->determineId();
$GLOBALS['TSFE']->initTemplate();
...
BEWARE: This only happens ONCE when eID script is called RIGHT AFTER FLUSHING the frontend cache