[BUGFIX] Handle config.absRefPrefix on JS/CSS files correctly again 08/56108/8
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 09:08:27 +0000 (10:08 +0100)
commit0162ff19abffb3f12797ff100d6425b84ea68529
treeccdd3874cfe4ffb1aaee162b7e7d40f04ac26405
parentb24e396c2310df4e2603fcf2d9e70b317ccd6de8
[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/56108
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: Markus Klein <markus.klein@typo3.org>
Tested-by: Markus Klein <markus.klein@typo3.org>
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Tested-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
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]