Issue Bug Rejected

#99434Keep the $GLOBALS variables unto redirect to install tool

Franz Holzinger 12/29/22, 10:35 updated 01/06/23, 10:25

Description

The TYPO3 backend executes a bootstrap and initializes all global variables correctly. However the administration tasks executed in the install tool do not have those variables. This breaks e.g. the feature of class replacement (former XCLASS) by
*$GLOBALS[‘TYPO3_CONF_VARS’][‘SYS’][‘Objects’][…]* .

This happens in the function \TYPO3\CMS\Install\Controller\BackendModuleController::setAuthorizedAndRedirect

$redirectLocation = PathUtility::getAbsoluteWebPath(‘install.php?install[controller]=’ . $controller . ‘&install[context]=backend’);
return new RedirectResponse($redirectLocation, 303);

Solution: The formerly initialized global variables must be saved in a session variable before the redirect and immediately restored after the redirect to the install tool.

See also Slack:

https://typo3.slack.com/archives/C025BQLFA/p1672171922498789

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.