Repository navigation
[BUGFIX] Skip fallback if the static file vanishes while reading it - #480
Merged
lochmueller merged 1 commit intoNov 18, 2026
Conversation
The fallback middleware checks that the static file exists and reads it afterwards. If the file is removed in between (e.g. by a cache flush), GeneralUtility::getUrl() returns false and HtmlResponse throws a TypeError. A failed read is now handled like a missing static file, so the request is passed on to TYPO3. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Owner
|
Thanks @magicHatOfTYPO3 for the fix. Merged. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Short description
FallbackMiddleware::handleViaFallback()checks that the static file exists and is readable,and reads it afterwards. If the file is removed in between (e.g. by a cache flush from a
scheduler task or the boost queue),
GeneralUtility::getUrl()returnsfalseandnew HtmlResponse(false, ...)throws aTypeError:The visitor gets an error page instead of the regularly rendered page.
A failed read is now handled like a missing static file: the middleware throws its own
Exception, soprocess()passes the request on to TYPO3, which renders the page.Related Issue
None. We see this in production on pages whose cache is flushed frequently (job pages that are
updated by an import every 10 minutes, together with the boost queue).
More Details
CacheServicestub removes the file ingetAbsoluteBaseDirectory(), which is called after the file checks and before the read.Without the fix the test fails with the
TypeErrorabove.while requesting the page: 27 of 400 requests answered with status 500 before the fix,
none after.
🤖 Generated with Claude Code