[BUGFIX] Use correct path to JS resources 75/50475/2
authorNicole Cordes <typo3@cordes.co>
Tue, 1 Nov 2016 15:10:07 +0000 (16:10 +0100)
committerBenni Mack <benni@typo3.org>
Wed, 2 Nov 2016 05:50:43 +0000 (06:50 +0100)
This problem is related to the change https://review.typo3.org/48915/.
The patch removed usage of ExtensionManagementUtility::extRelPath and
replaced it with other calls. While trying to resolve a relative path
in BackendController::loadResourcesForRegisteredNavigationComponents,
a wrong replacement was introduced. This patch ensures the old behaviour
to retrieve the relative path.

Resolves: #78490
Releases: master
Change-Id: I2c2edf6d1b02efd95b4485da88777eec0dd515c6
Reviewed-on: https://review.typo3.org/50475
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Malte Koitka <malte@cytrus.de>
Tested-by: Malte Koitka <malte@cytrus.de>
Reviewed-by: Benni Mack <benni@typo3.org>
Tested-by: Benni Mack <benni@typo3.org>
typo3/sysext/backend/Classes/Controller/BackendController.php

index b014a0b..aaafd9f 100644 (file)
@@ -360,7 +360,7 @@ class BackendController
                 $info['extKey'] = 'backend';
             }
             $absoluteComponentPath = ExtensionManagementUtility::extPath($info['extKey']) . $componentDirectory;
-            $relativeComponentPath = PathUtility::getAbsoluteWebPath($absoluteComponentPath);
+            $relativeComponentPath = PathUtility::getRelativePath(PATH_site . TYPO3_mainDir, $absoluteComponentPath);
             $cssFiles = GeneralUtility::getFilesInDir($absoluteComponentPath . 'css/', 'css');
             if (file_exists($absoluteComponentPath . 'css/loadorder.txt')) {
                 // Don't allow inclusion outside directory