getSiteByPageId($pageId); $GLOBALS['TSFE'] = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance( 'TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController', $GLOBALS['TYPO3_CONF_VARS'], $site, $site->getDefaultLanguage() ); $GLOBALS['TSFE']->set_no_cache(); $GLOBALS['TSFE']->fe_user = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Frontend\Authentication\FrontendUserAuthentication::class); $GLOBALS['TSFE']->fe_user->checkPid_value = 0; $GLOBALS['TSFE']->fe_user->start(); $GLOBALS['TSFE']->fe_user->unpack_uc(); $GLOBALS['TSFE']->determineId(); $GLOBALS['TSFE']->getConfigArray(); $GLOBALS['TSFE']->cObj = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer'); $GLOBALS['TSFE']->settingLanguage(); $GLOBALS['TSFE']->settingLocale(); } }