Review main Merged

95186[BUGFIX] Provide error page to failsafe container

Stefan Bürk CR +2 V +2 Normal +100 −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
    • Oliver Klee +1
    • Markus Klein +1
    • Garvin Hicking +1
    • Josua Vogel +1
    • Simon Schaufelberger +1
  • Verified V +2 Done
    • Stefan Bürk +2
    • Oliver Klee +1
    • Markus Klein +1
    • Garvin Hicking +1
    • Josua Vogel +1
    • Simon Schaufelberger +1
    • core-ci +1 CI

Issues 2

Files 3

Review log 2028

Show 23 earlier messages
  1. Stefan Bürk uploaded patch set 1 08/09/26, 21:00

  2. core-ci voted on patch set 1 V +1 08/09/26, 21:23 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106226

  3. Stefan Bürk rebased onto patch set 2 V +1 08/11/26, 00:32

  1. core-ci voted on patch set 2 V +1 08/11/26, 00:41 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106350

  2. Stefan Bürk updated the commit message in patch set 3 V +1 08/11/26, 04:00

  3. core-ci voted on patch set 3 V +1 08/11/26, 04:10 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106364

  4. Stefan Bürk rebased onto patch set 4 V +1 08/11/26, 05:17

  5. core-ci voted on patch set 4 V +1 08/11/26, 05:27 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106383

  6. Stefan Bürk rebased onto patch set 5 V +1 08/11/26, 11:38

  7. core-ci voted on patch set 5 V +1 08/11/26, 11:48 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106414

  8. Stefan Bürk uploaded patch set 6 08/11/26, 13:29

    Copied Votes: * Verified+1 (copy condition: "**changekind:NO_CHANGE**")
  9. core-ci voted on patch set 6 V +1 08/11/26, 13:39 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106430

  10. Stefan Bürk updated the commit message in patch set 7 V +1 08/11/26, 14:14

  11. Stefan Bürk commented on patch set 7 08/11/26, 14:15

    This change is ready for review.
  12. core-ci voted on patch set 7 V +1 08/11/26, 14:24 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106443

  13. Oliver Klee voted on patch set 7 CR +1 V +1 08/11/26, 14:34

  14. Stefan Bürk commented on patch set 7 CR -1 08/12/26, 09:26

    Need to rethink the solution.
  15. Stefan Bürk uploaded patch set 8 CR +1 V +1 08/14/26, 20:48

  16. core-ci voted on patch set 8 V +1 08/14/26, 20:58 Core CI is happy: https://git.typo3.org/typo3/CI/cms/-/pipelines/106719

  17. Stefan Bürk commented on patch set 8 08/14/26, 21:01

    Reply

    Done
  18. Simon Schaufelberger voted on patch set 8 CR +1 08/15/26, 09:48

  19. Simon Schaufelberger voted on patch set 8 V +1 08/15/26, 12:39

  20. Josua Vogel voted on patch set 8 CR +1 V +1 08/16/26, 13:10

  21. Markus Klein voted on patch set 8 CR +1 V +1 08/16/26, 15:56

  22. Oliver Klee voted on patch set 8 CR +1 V +1 08/16/26, 17:02

  23. Garvin Hicking voted on patch set 8 CR +1 V +1 08/31/26, 09:43

  24. Stefan Bürk voted on patch set 8 CR +2 V +2 08/31/26, 09:48

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