Fix regional language URL resolution for fallback content (CST-6191) - #16
Draft
MortenFriisSiteImprove wants to merge 1 commit into
Draft
MortenFriisSiteImprove wants to merge 1 commit into
MortenFriisSiteImprove wants to merge 1 commit into
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.
Problem and change
Selecting a regional language for content inherited from another language can return a master-language URL or fail to load the page. The controller currently disables configured fallback and drops the editor's locale before URL resolution.
Honor configured fallback/replacement rules and pass the selected locale through to the URL resolver. Resolve the public page without its editor revision; calls without an editor locale use the page's language. For example, an
en-USselection can retain its/en-us/route even when the loaded content is English. Optimizely still supplies the route; no customer domains or language mappings are hardcoded.Existing origin mappings remain in effect. The original helper method remains available, with a default implementation of the new overload for existing custom helpers. Such helpers need to implement the overload to gain locale-aware behavior.
Validation
The new tests exercise the production controller and helper with content/URL resolution doubles. They do not establish actual CMS fallback routing or live Siteimprove report matching. See validation and risk assessment.