Release 5.0.0 cli fixes - #151
Open
Mainbird wants to merge 2 commits into
Open
Conversation
…RequestUrlOnCliException
…ed (CLI sub-requests / EXT:solr v14 indexing)
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.
Fix route enhancer failures during CLI sub-requests (e.g. EXT:solr v14 indexing)
When TYPO3's route matching runs inside a CLI context — such as EXT:solr v14 page indexing,
which triggers a sub-request without a real HTTP request URL —
ServerRequestFactory::fromGlobals() throws InvalidRequestUrlOnCliException. This happened
because SiteService::getResolvedByTypo3() unconditionally called it while trying to resolve the
current site.
This surfaced downstream in ResourceEnhancer::enhanceForMatching(): getBasePath() depends on the
current site being resolvable, so the exception propagated and broke route matching for the
entire request — not just the T3api routes.
Changes
try/catch — if the base path can't be resolved (no current site), skip T3api enhancement for
that request instead of throwing. The API routes are irrelevant in that case anyway.
instead, since catching there covers the failure at its actual point of impact.
Testing
Verified route matching no longer throws during a CLI sub-request lacking a request URL, while
normal HTTP request handling is unaffected.