[BUGFIX] Properly use requirejs-loader.js in frontend context 10/59810/3
authorOliver Hader <oliver@typo3.org>
Wed, 27 Feb 2019 09:27:08 +0000 (10:27 +0100)
committerAnja Leichsenring <aleichsenring@ab-softlab.de>
Fri, 1 Mar 2019 14:29:00 +0000 (15:29 +0100)
The eID handler in frontend context had a wrong method name. Besides
that generating according <script src="requirejs-loader.js"> tag had
flaws in path resolving.

Resolves: #87570
Releases: master, 9.5, 8.7
Change-Id: Ic5a3b824e8ae5aa776fd0e6502682aba6ae282b8
Reviewed-on: https://review.typo3.org/c/59810
Tested-by: TYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Jürgen Venne <venne@schaffrath-digital.de>
Tested-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
Reviewed-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Andreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Reviewed-by: Jürgen Venne <venne@schaffrath-digital.de>
Reviewed-by: Anja Leichsenring <aleichsenring@ab-softlab.de>
typo3/sysext/core/Classes/Page/PageRenderer.php
typo3/sysext/core/Resources/Public/JavaScript/requirejs-loader.js
typo3/sysext/core/ext_localconf.php

index 7d06cec..774ee6b 100644 (file)
@@ -1456,11 +1456,9 @@ class PageRenderer implements \TYPO3\CMS\Core\SingletonInterface
 
         if (!empty($requireJsConfig['typo3BaseUrl'])) {
             $html .= '<script src="'
-                . $this->processJsFile($this->getAbsoluteWebPath(
-                    GeneralUtility::getFileAbsFileName(
-                        'EXT:core/Resources/Public/JavaScript/requirejs-loader.js'
-                    )
-                ))
+                . $this->processJsFile(
+                    'EXT:core/Resources/Public/JavaScript/requirejs-loader.js'
+                )
                 . '" type="text/javascript"></script>' . LF;
         }
 
index e0a000a..ec446af 100644 (file)
    * @param {Object} url the URL to the module.
    */
   req.load = function(context, name, url) {
-    if (inPath(context.config, name)) {
+    if (inPath(context.config, name) || url.charAt(0) === '/') {
       return originalLoad.call(req, context, name, url);
     }
 
index 86fe8c2..b4d489a 100644 (file)
@@ -90,7 +90,7 @@ $signalSlotDispatcher->connect(
 unset($signalSlotDispatcher);
 
 $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['dumpFile'] = \TYPO3\CMS\Core\Controller\FileDumpController::class . '::dumpAction';
-$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['requirejs'] = \TYPO3\CMS\Core\Controller\RequireJsController::class . '::retrievePath';
+$GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['requirejs'] = \TYPO3\CMS\Core\Controller\RequireJsController::class . '::retrieveConfiguration';
 
 /** @var \TYPO3\CMS\Core\Resource\Rendering\RendererRegistry $rendererRegistry */
 $rendererRegistry = \TYPO3\CMS\Core\Resource\Rendering\RendererRegistry::getInstance();