Review main Merged

71395[BUGFIX] Fix PageRenderer->addRequireJsConfiguration from ext_localconf

Benjamin Franzke CR +2 V +2 Normal +47 −35 updated 10/01/21, 13:00

Commit message

TYPO3_REQUESTTYPE constants have been deprecated since #92947,
but PageRenderer->addRequireJsConfiguration() currently needs to be
scoped to BE context as the applicationType is derived
from the global TYPO3_REQUEST object since #92953.

This causes problems as the request object is not available during
ext_localconf.php loading, and is therefore always considered to be BE
 – also in FE, causing RequireJS to be always loaded, if PageRenderer
is configued via ext_localconf.php as possible in TYPO3 v10.

Therefore currently there is no longer a "supported" way to register
RequireJS configuration in ext_localconf.php.

This change delays RequireJs configuration loading and merging
until configuration is actually used, allowing configuration to be
registered anytime and without REQUESTTYPE conditions.
Also ApplicationType is evaluated on demand instead of during object
construction.

In TYPO3 v12 this should better be provided as an event that
allows to enhance the configuration, therefore add that as
todo to t3editor and rte_ckeditor which use the render-preProcess
hook right now, which works for them, but not for extensions
that need to register RequireJS configuration for the TYPO3
backend login screen.

Review

  • Code review CR +2

    Imported before Forger kept the single votes, the next import adds them.

  • Verified V +2

    Imported before Forger kept the single votes, the next import adds them.

Issues 4

Files 4