Feature #84863
closedMissing argument 1 for TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::__construct()
0%
Description
Hello,
the following line causes an error:
$temp_TSFEclassName = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\CMS\\Frontend\\Controller\\TypoScriptFrontendController');
PHP Warning: Missing argument 1 for TYPO3\CMS\Frontend\Controller\TypoScriptFrontendController::__construct(), called in /var/www/web5/htdocs/typo3_src-7.6.26/typo3/sysext/core/Classes/Utility/GeneralUtility.php on line 4546 and defined in /var/www/web5/htdocs/typo3_src-7.6.26/typo3/sysext/frontend/Classes/Controller/TypoScriptFrontendController.php line 902
What can I do?
Updated by Schu Miel over 6 years ago
$GLOBALS['TSFE'] = new $temp_TSFEclassName($GLOBALS['TYPO3_CONF_VARS'], intval($pid), 0, true);
Updated by Stephan Großberndt over 6 years ago
- Status changed from New to Rejected
Hi, this is the issue tracker for bugs in TYPO3 core. What you created as an issue is not a bug but a question on how to use the API in your extension.
In order to get support for questions like that please register in Slack https://forger.typo3.com/slack and ask your questions in channel #typo3-cms or use stackoverflow.
To answer your question: As the PHP warning tells you you called the constructor of `TypoScriptFrontendController` without specifying the necessary arguments (which is the TYPO3_CONF_VARS, ID of the page and page type)