Project

General

Profile

Actions

Bug #99434

closed

Keep the $GLOBALS variables unto redirect to install tool

Added by Franz Holzinger almost 2 years ago. Updated almost 2 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
Install Tool
Target version:
Start date:
2022-12-29
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
hard
Is Regression:
Sprint Focus:

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


Files

patch-99434.diff (957 Bytes) patch-99434.diff Franz Holzinger, 2022-12-29 13:33
patch-99434-2.diff (1.01 KB) patch-99434-2.diff Franz Holzinger, 2022-12-30 12:48

Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Bug #95708: clear cache Hook not executed with Admin Tools -> Maintenance -> Flush CacheClosed2021-10-19

Actions
Related to TYPO3 Core - Bug #91984: Extension configuration prefills from AdditionalConfiguration and saves values to LocalConfiguration, behaving different than the normal configuration UINew2020-08-12

Actions
Actions #1

Updated by Franz Holzinger almost 2 years ago

  • Related to Bug #98992: form DataStructureIdentifierHook uses $GLOBALS['LANG'] which may not be initialized added
Actions #2

Updated by Franz Holzinger almost 2 years ago

  • Related to Bug #95708: clear cache Hook not executed with Admin Tools -> Maintenance -> Flush Cache added
Actions #3

Updated by Franz Holzinger almost 2 years ago

  • Related to Bug #91984: Extension configuration prefills from AdditionalConfiguration and saves values to LocalConfiguration, behaving different than the normal configuration UI added
Actions #4

Updated by Franz Holzinger almost 2 years ago

The attached patch fixes this issue.

Actions #5

Updated by Franz Holzinger almost 2 years ago

Another patch which just reads in all ext_localconf.php files of all extensions.

Actions #6

Updated by Christian Kuhn almost 2 years ago

  • Status changed from New to Rejected

The install tool is not supposed to be xclass'able.

Actions #7

Updated by Kay Strobach almost 2 years ago

An installtool should be stable as hell, so no changes from third parties expected here. It’s kmho a no go to modify it except with composer patches.

Actions #8

Updated by Franz Holzinger almost 2 years ago

Also the extension configuration has become a part of the Install Tool since the newer TYPO3 versions. If a user makes a wrong extension configuration now, then this could make the TYPO3 backend instable. It would be better to be able to autoconfigure extensions or give case specific comments in some cases. The possiblities of TYPO3 are very limited here. The usage of a class exchange by extensions does not mean that this will lead to instability. It could instead help to overcome errors.
Most parts of the Install Tool do allow XCLASSing even without this patch!

Actions #9

Updated by Christian Kuhn almost 2 years ago

The main classes of the install tool do not support xclassing and will further continue to reduce the potential ability to do so by defining more classes as final. This is mainly because most modules do not load ext_* files, exceptions are some modules like the upgrade wizards, and those should further reduce this part as well.

The idea to transfer state from the backend to the install tool by putting state into a session is a nightmare from an architectual point of view and will not be implemented.

Actions #10

Updated by Christian Kuhn about 1 year ago

  • Related to deleted (Bug #98992: form DataStructureIdentifierHook uses $GLOBALS['LANG'] which may not be initialized)
Actions

Also available in: Atom PDF