[BUGFIX] Handle config.absRefPrefix on JS/CSS files correctly again 26/56126/2
authorOliver Hader <oliver@typo3.org>
Mon, 12 Mar 2018 12:10:42 +0000 (13:10 +0100)
committerOliver Hader <oliver.hader@typo3.org>
Tue, 13 Mar 2018 10:17:51 +0000 (11:17 +0100)
commit83f279ae2a31f7a4e406f8f3abf49846e7eb0fbe
tree38184fc9dc02bba065632ef7d1d3c7602db09b42
parentd9c29e61d4d71acb9356da865fb0e3af6b5d68e0
[BUGFIX] Handle config.absRefPrefix on JS/CSS files correctly again

Issue #77589 introduced automatic resolving of relative paths during
v8.4.0 development in the PageRenderer component. Doing this in some
backend context is fine - however if applied for frontend rendering,
config.absRefPrefix was not applied anymore to these files.

Reason for this behavior is applying PathUtility::getAbsoluteWebPath
which prefixes files with /<TYPO3_SITE_PATH>/ - however absRefPrefix
only works on relative URIs. Extending the absRefPrefix patterns in
TypoScriptFrontendController::setAbsRefPrefix() by mentioned prefix
would adjust explicitly defined absolute paths as well.

To solve this bug, the prefix /<TYPO3_SITE_PATH>/ is
not applied in frontend rendering contexts anymore.

Resolves: #83630
Releases: master, 8.7
Change-Id: Ib01f698c14fb646173ec24e26027c7d657700f87
Reviewed-on: https://review.typo3.org/56126
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: TYPO3com <no-reply@typo3.com>
Reviewed-by: Susanne Moog <susanne.moog@typo3.org>
Tested-by: Susanne Moog <susanne.moog@typo3.org>
Reviewed-by: Oliver Hader <oliver.hader@typo3.org>
Tested-by: Oliver Hader <oliver.hader@typo3.org>
typo3/sysext/core/Classes/Page/PageRenderer.php
typo3/sysext/frontend/Tests/Functional/Rendering/Fixtures/UriPrefixRenderingTest.typoscript [new file with mode: 0644]
typo3/sysext/frontend/Tests/Functional/Rendering/UriPrefixRenderingTest.php [new file with mode: 0644]