[TASK] Add tool-function to strip PATH_site-part of paths
[Packages/TYPO3.CMS.git] / typo3 / sysext / core / Classes / TypoScript / TemplateService.php
index 7d3c1ca..f8d4524 100644 (file)
@@ -1245,7 +1245,7 @@ class TemplateService {
                        list($extKey, $script) = explode('/', substr($file, 4), 2);
                        if ($extKey && \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey)) {
                                $extPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($extKey);
-                               $newFile = substr($extPath, strlen(PATH_site)) . $script;
+                               $newFile = \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix($extPath) . $script;
                        }
                        if (!@is_file((PATH_site . $newFile))) {
                                if ($this->tt_track) {