Skip to content

PHP Warning: Undefined global variable $TYPO3_REQUEST in BackendUserAuthentication.php after container migration #640

@prdt3e

Description

@prdt3e

Bug Report

Title: PHP Warning: Undefined global variable $TYPO3_REQUEST in BackendUserAuthentication.php after container migration

After running the upgrade step EXT:container: Migrate "container" sorting via the Install Tool, a PHP warning was triggered:

PHP Warning: Undefined global variable $TYPO3_REQUEST 
in vendor/typo3/cms-core/Classes/Authentication/BackendUserAuthentication.php line 1842
TYPO3\CMS\Core\Error\Exception thrown in
vendor/typo3/cms-core/Classes/Error/ErrorHandler.php line 141
Requested URL:
/typo3/install.php?install%5Bcontroller%5D=upgrade&install%5Bcontext%5D=

Steps to Reproduce

  1. Open the Install Tool (/typo3/install.php)
  2. Run the upgrade action: EXT:container: Migrate "container" sorting
  3. Observe the PHP warning in the output or PHP error log.

Expected Behavior

No PHP warning should occur during or after the migration process.

Additional Context

  • The warning occurred only when logged in via the Install Tool, not when logged in as a normal backend user.
  • After logging into the backend normally, the issue did not occur again.
  • It seems $GLOBALS['TYPO3_REQUEST'] is missing or uninitialized in the Install Tool execution context.
  • Possibly related to code in BackendUserAuthentication that expects $TYPO3_REQUEST to be globally available.

Possible Cause / Suggestion

The Install Tool likely runs in a limited bootstrap context without initializing the global $TYPO3_REQUEST.
A null or fallback check could be added in BackendUserAuthentication before accessing the variable.

System Information

Component Version
TYPO3 13.4.19
EXT:container 3.1.10
PHP 8.3.27

🏷️ Labels

bug typo3-13 container-extension install-tool

🧾 Notes

This issue only appears in Install Tool context and not in regular backend sessions, suggesting a missing initialization step or dependency during the upgrade routine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions