Review 14.3 Merged

98278[BUGFIX] Keep status code for unresolved error page

Benjamin Kott CR +2 V +2 Normal +62 −1 updated 12/02/26, 10:16

Commit message

PageContentErrorHandler shows the configured error page of a site.
When the handler could not resolve this page, it sent the text
"Invalid error handler configuration" with the status code 200. The
handler wrote no log entry. Thus CDNs, search engines and monitoring
tools read the error as a valid page.

The handler cannot resolve the error page in these cases:

- The page is outside of the page tree of all sites. SiteFinder then
  throws SiteNotFoundException.
- The router cannot build a URI for the page. PageRouter then throws
  InvalidRouteArgumentsException.

Now the handler sends the TYPO3 error page with the original status
code, as it does when it cannot get the content of the error page.
The handler also logs a warning with the configured error content
source and the message of the exception.

Since #111579, an error page that is not available in the requested
language gets the TYPO3 error page with the original status code. A
new test also covers this case.
Show more Show less

Review

  • Code review CR +2 Done
    • Benjamin Kott +2
  • Verified V +2 Done
    • Benjamin Kott +2
    • core-ci +1 CI

Issues 2

Files 3

Review log 34

  1. Benjamin Kott uploaded patch set 1 12/02/26, 10:07

  2. core-ci voted on patch set 1 V +1 12/02/26, 10:13 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/116167

  3. Benjamin Kott voted on patch set 1 CR +2 V +2 12/02/26, 10:16

  4. Benjamin Kott merged patch set 2 12/02/26, 10:16