[BUGFIX] Fix absolute backend URL generation in frontend context
$normalizedParams->getRequestDir() returns '/' for frontend requests and `/typo3/` for backend requests. This results in problems when the backend UriBuilder relies on getRequestDir() to provide the `/typo3/` suffix for backend URL generation. UriBuilder is now changed to base absolute URLs on getSiteUrl(), which is defined to return equal values for backend and frontend requests, the typo3 suffix is added manually. Note that v12 introduced similar behavior with #99234, where UriBuilder was adapted to use BackendEntryPointResolver, which rebases the backend URL calculation on the site path as well. Also note that the ABSOLUTE_URL mode in backend UriBuilder isn't actually used by the TYPO3 frontend, but some extensions started to execute system reports in frontend context, which exposed this bug with the introduction of #99347. Releases: 11.5, 10.4 Resolves: #99368 Related: #99347 Related: #99234 Change-Id: Ifaaeb4725c0243d34603dc86b2c89d12d9c06bdd Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/77159 Reviewed-by:Oliver Hader <oliver.hader@typo3.org> Tested-by:
core-ci <typo3@b13.com> Tested-by:
Benni Mack <benni@typo3.org> Reviewed-by:
Benni Mack <benni@typo3.org> Tested-by:
Benjamin Franzke <bfr@qbus.de> Tested-by:
Oliver Hader <oliver.hader@typo3.org> Reviewed-by:
Benjamin Franzke <bfr@qbus.de>
Showing
- typo3/sysext/backend/Classes/Routing/UriBuilder.php 2 additions, 2 deletionstypo3/sysext/backend/Classes/Routing/UriBuilder.php
- typo3/sysext/backend/Tests/Functional/Template/Components/Buttons/Action/ShortcutButtonTest.php 8 additions, 0 deletions...Template/Components/Buttons/Action/ShortcutButtonTest.php
- typo3/sysext/backend/Tests/Functional/Template/Fixtures/RecordListCopyToClipboard.html 1 addition, 1 deletion...nctional/Template/Fixtures/RecordListCopyToClipboard.html
- typo3/sysext/backend/Tests/Functional/Template/Fixtures/RecordListSingleTableCopyToClipboard.html 1 addition, 1 deletion...mplate/Fixtures/RecordListSingleTableCopyToClipboard.html
- typo3/sysext/backend/Tests/Functional/Template/Fixtures/SpecialRouteIdentifierWithArgumentsCopyToClipboard.html 1 addition, 1 deletion...s/SpecialRouteIdentifierWithArgumentsCopyToClipboard.html
- typo3/sysext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php 34 additions, 1 deletion...ext/extbase/Tests/Unit/Mvc/Web/Routing/UriBuilderTest.php
Please register or sign in to comment