Bug #103399
closedTYPO3 12.4.12 - PHP 8.3.3 – 404 Redirects in site handling not possible for external URL
100%
Description
While trying to redirect 404s in the site module to an external page I get:
(1/1) #1544172839 RuntimeException
Error handler could not fetch error page "https://zazu.berlin/404.html/", status code: 404
Redirects to an internal page (page in the page tree) works.
Test: The external page is reachable under the exact same link.
Files
Updated by Stefan Bürk 5 months ago
- File Auswahl_1523.png Auswahl_1523.png added
- Status changed from New to Accepted
- Assignee set to Stefan Bürk
Updated by Stefan Bürk 5 months ago
Confirmation and analysis/background¶
I could confirm the issue. The `PageContentErrorHandler`
makes only sub-requests to the same instance, which has
been introduced with #94402 and #98396. External URL's,
which are valid target to be set with the link handling
in the backend, this could never work and retrieve the
external error page content.
The linktype of the resolved url params can be used to
distinguish which type or error page link it is, and use
either the sub-request or external request based on the
link type.
Note: External requests may still hit the same instance,
and could lead to resolving loops if the resource is not
available as external request. This must be guarded
and detected.
Additional notes / remarks¶
is a invalid url and hits a real server error page
with an 404 status code. The correct URL would be
without the ending slash. Assumed, the TYPO3 Core
PageContentErrorHandler would execute a real request
the contend could be retrieved correctly.
A external url returning 404 should and must be
considered as "not available/found" and thus fallback
to a generic "not resolved" response.
Updated by Gerrit Code Review 5 months ago
- Status changed from Accepted to Under Review
Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83947
Updated by Stefan Bürk 5 months ago
- Related to Task #98396: Enable internal subrequests for error pages by default added
- Related to Bug #94402: Don't issue second HTTP request for error handling added
Updated by Gerrit Code Review 5 months ago
Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83947
Updated by Gerrit Code Review 5 months ago
Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83947
Updated by Gerrit Code Review 5 months ago
Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83947
Updated by Gerrit Code Review 5 months ago
Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83947
Updated by Gerrit Code Review 5 months ago
Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83947
Updated by Gerrit Code Review 5 months ago
Patch set 1 for branch 12.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/83978
Updated by Stefan Bürk 5 months ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 36b63a8c109a5a805e1835f67cf56d1a746f3bcc.
Updated by Stefan Bürk 4 months ago
- Related to Task #103818: Streamline `PageContentErrorHandler` added