{{ message }}
Repository navigation
Conversation
This branch has not been deployed
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.

Changes
/de/livewithfallback: { de: 'en' }) was answered with status302, the page body and noLocation.getDefaultStatusCodeassigns that302to a page reached through one of itsfallbackRoutes, and since fix(i18n): only trigger fallback for 404 responses #15704 nothing consumed it:finalizeI18nonly treats thefallbackroute type as a miss, and such a page has typepage.finalizeI18nnow treats that render like the fallback sentinel, socomputeFallbackRouterewrites or redirects perfallbackType. A page that took over the response (an explicit redirect or status) is still left alone, which keeps [i18n] Fallback middleware intercepts 3xx redirects from page handlers, should only trigger on 404 #15688 fixed.Fixes #18473
Testing
test/units/i18n/i18n-app.test.ts: on-demand route reached through a fallback route withrewrite(200, body) andredirect(302 +Location); a redirect or status set by the page is preserved.test/units/routing/routing-helpers.test.ts: the extractedisFallbackRouteMatchhelper.test/i18n-fallback-on-demand.test.tswith thei18n-fallback-on-demandfixture: full build with the test adapter for both fallback types; the prerendered fallback page assertions document the build path, which was not affected.Docs
No docs update needed: this restores the documented
fallbackTypebehavior for on-demand pages.