Project

General

Profile

Actions

Bug #103399

closed

TYPO3 12.4.12 - PHP 8.3.3 – 404 Redirects in site handling not possible for external URL

Added by Thomas Hezel about 2 months ago. Updated 12 days ago.

Status:
Resolved
Priority:
Should have
Assignee:
Category:
Redirect Handling
Target version:
-
Start date:
2024-03-14
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
12
PHP Version:
8.3
Tags:
site module, 404 redirects, external link to 404
Complexity:
Is Regression:
Sprint Focus:

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

Auswahl_1523.png (62.3 KB) Auswahl_1523.png Stefan Bürk, 2024-04-21 00:31

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #98396: Enable internal subrequests for error pages by defaultClosed2022-09-21

Actions
Related to TYPO3 Core - Bug #94402: Don't issue second HTTP request for error handlingClosed2021-06-23

Actions
Actions #1

Updated by Stefan Bürk 15 days ago

Actions #2

Updated by Stefan Bürk 14 days 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

https://zazu.berlin/404.html/

is a invalid url and hits a real server error page
with an 404 status code. The correct URL would be

https://zazu.berlin/404.html

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.

Actions #3

Updated by Gerrit Code Review 14 days 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

Actions #4

Updated by Stefan Bürk 14 days 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
Actions #5

Updated by Gerrit Code Review 14 days 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

Actions #6

Updated by Gerrit Code Review 14 days 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

Actions #7

Updated by Gerrit Code Review 14 days 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

Actions #8

Updated by Gerrit Code Review 14 days 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

Actions #9

Updated by Gerrit Code Review 13 days 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

Actions #10

Updated by Gerrit Code Review 12 days 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

Actions #11

Updated by Stefan Bürk 12 days ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF