Review main Merged

98273[BUGFIX] Keep status code for unresolved error page

Matthias Vogel 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
    • Benni Mack +1
  • Verified V +2 Done
    • Benjamin Kott +2
    • Benni Mack +1
    • core-ci +1 CI

Issues 2

Files 3

Review log 56

  1. Matthias Vogel uploaded patch set 1 12/02/26, 06:49

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

  3. Benni Mack voted on patch set 1 CR +1 V +1 12/02/26, 08:07

  4. Benjamin Kott voted on patch set 1 CR +1 V +1 12/02/26, 08:50

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

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