[BUGFIX] Add path to requireJS cache identifier 40/52340/2
authorSusanne Moog <susanne.moog@typo3.com>
Mon, 3 Apr 2017 13:32:20 +0000 (15:32 +0200)
committerFrank Naegler <frank.naegler@typo3.org>
Mon, 3 Apr 2017 14:30:16 +0000 (16:30 +0200)
The path to the current TYPO3 installation is
now taken into account when generating the cache
identifier for requireJS to generate correct relative
paths for sub-directory and domain based calls to
the backend.

Resolves: #78740
Releases: master
Change-Id: Iaa82494b6a8c1945aa2deba98b39ac55b5da06ed
Reviewed-on: https://review.typo3.org/52340
Reviewed-by: Wouter Wolters <typo3@wouterwolters.nl>
Reviewed-by: Thomas Hohn <thomas@hohn.dk>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Philipp Gampe <philipp.gampe@typo3.org>
Tested-by: Philipp Gampe <philipp.gampe@typo3.org>
Reviewed-by: Jan Helke <typo3@helke.de>
Tested-by: Tobias Hüske <t.hueske@mittwald.de>
Reviewed-by: Frank Naegler <frank.naegler@typo3.org>
Tested-by: Frank Naegler <frank.naegler@typo3.org>
typo3/sysext/core/Classes/Page/PageRenderer.php

index 54b86a0..194bbff 100644 (file)
@@ -1467,7 +1467,7 @@ class PageRenderer implements \TYPO3\CMS\Core\SingletonInterface
 
         $loadedExtensions = ExtensionManagementUtility::getLoadedExtensionListArray();
         $isDevelopment = GeneralUtility::getApplicationContext()->isDevelopment();
-        $cacheIdentifier = 'requireJS_' . md5(implode(',', $loadedExtensions) . ($isDevelopment ? ':dev' : ''));
+        $cacheIdentifier = 'requireJS_' . md5(implode(',', $loadedExtensions) . ($isDevelopment ? ':dev' : '') . GeneralUtility::getIndpEnv('TYPO3_REQUEST_SCRIPT'));
         /** @var VariableFrontend $cache */
         $cache = GeneralUtility::makeInstance(CacheManager::class)->getCache('assets');
         $this->requireJsConfig = $cache->get($cacheIdentifier);