Issue Bug Resolved

#110421Install tool answers with an empty response when an exception is handled

Stefan Bürk 08/11/26, 01:22 updated 08/31/26, 10:10

Description

Any uncaught exception in an install tool request produces HTTP 500 with a zero byte body. Nothing is in the response, and nothing is in the TYPO3 log – the only trace is in the web server log:

PHP Fatal error: Uncaught ArgumentCountError: Too few arguments to function
TYPO3\CMS\Core\Controller\ErrorPageController::__construct(), 0 passed
in GeneralUtility.php on line 2489 and exactly 4 expected
#1 ProductionExceptionHandler.php(61)

ProductionExceptionHandler::echoExceptionWeb() renders its page through ErrorPageController, which is created from the dependency injection container. The install tool runs on the failsafe container, which does not have that service, so GeneralUtility::makeInstance() falls through to constructing the class directly and dies on its required constructor arguments – inside the exception handler, which therefore replaces the exception it was about to report with a fatal error of its own.

DebugExceptionHandler is not affected; it builds its HTML itself.

Fix

Fall back to a self contained page when the regular one cannot be built, so the response keeps title, message and code of the original exception. An exception handler must never throw.

Patch

Gerrit 95186, topic database-analyzer.

Releases: main, 14.3, 13.4

Reviews 3

History 210

  1. Stefan Bürk commented <span data-processor="relativetime" data-value="2026-08-14T20:49:46+00:00" > 08/14/26, 20:49 </span>

    The approach changed after review, the description above still describes the first attempt.

    Falling back to a hand written page treats the symptom. The install tool still could not render the regular error page, it merely stopped answering with an empty body. Measured against a real failsafe container – the one Bootstrap::init($classLoader, true) builds for a ?__typo3_install request – nothing actually prevents it from rendering:

    • ViewFactoryInterface is already provided for the failsafe container by EXT:fluid,
    • RequestId is one of the default services Bootstrap registers,
    • Typo3Information and PolicyRegistry are constructed without arguments.

    Two registrations are missing, and the second only becomes visible once the first one is out of the way:

    1. ErrorPageController itself. No service provider declares it, so GeneralUtility::makeInstance() falls through to constructing it directly and dies on its four constructor arguments.
    2. NonceViewHelper. The error page template nonces its inline style, and view helpers are resolved through makeInstance() in failsafe mode as well.

    Both are now provided the way the event dispatcher and the system resource factory already are, so the symfony container keeps its own autowired instances untouched. EXT:install hard-wires the view helpers its own templates need for exactly the same reason, see #109684.

    ProductionExceptionHandler is therefore unchanged again, and the regression test boots a real failsafe container instead of a stub whose has() always returns false.

    One thing this does not close: the exception handler is registered before the dependency injection container exists. An exception thrown between those two points still finds no container at all, so it keeps producing an empty body. That window is narrow, untested, and unchanged on all branches.

  2. Stefan Bürk commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-08-31T10:10:09+00:00" > 08/31/26, 10:10 </span>

    Applied in changeset commit:086b9e6db6f2f6c49ec04860f3991dffedd91093.