Review 14.3 Merged

95486[BUGFIX] Provide error page to failsafe container

Stefan Bürk CR +2 V +2 Normal +105 −0 updated 08/31/26, 10:09

Commit message

`ProductionExceptionHandler` renders through `ErrorPageController`,
which `GeneralUtility::makeInstance()` resolves from the dependency
injection container. Applications running on the failsafe container -
the install tool does - have no entry for it: `FailsafeContainer::has()`
is a plain registry lookup without autowiring, so `makeInstance()` falls
back to constructing the class directly and dies with an
`ArgumentCountError` on its four constructor arguments.

That happens inside the exception handler, after the status headers have
been sent. The client receives a bare status code with an empty body,
and the original exception shows up nowhere but the web server log. Any
uncaught exception in the install tool behaved that way.

Nothing about the controller actually prevents it from running without
symfony DI. The view factory is already provided for the failsafe
container by EXT:fluid, `RequestId` is one of the default services
`Bootstrap` registers, and `Typo3Information` and `PolicyRegistry` are
constructed with no arguments.

EXT:core therefore provides the controller as a fallback service, the
way the event dispatcher and the system resource factory are already
provided. The error page template nonces its inline style, so
`NonceViewHelper` needs the same treatment in EXT:fluid: view helpers
are resolved through `makeInstance()` in failsafe mode as well, which is
why EXT:install hard-wires the ones its own templates use.

`ErrorPageControllerTest` boots a failsafe container and renders the
page through it, which covers both registrations. Without the first the
container does not have the controller, without the second rendering
dies on the view helper.

Review

  • Code review CR +2 Done
    • Stefan Bürk +2
  • Verified V +2 Done
    • Stefan Bürk +2
    • core-ci +1 CI

Issues 2

Files 3

Review log 34

  1. Stefan Bürk uploaded patch set 1 08/31/26, 09:56

  2. core-ci voted on patch set 1 V +1 08/31/26, 10:06 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/107403

  3. Stefan Bürk voted on patch set 1 CR +2 V +2 08/31/26, 10:09

  4. Stefan Bürk merged patch set 2 08/31/26, 10:09