Repository navigation
Fix regional language URL resolution for fallback content (CST-6191) - #16
Merged
MortenFriisSiteImprove merged 4 commits intoOct 13, 2026
Merged
Conversation
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 inherited content can fail to load the page or return its master-language URL. The controller disables configured fallback and drops the editor's locale before URL resolution.
Honor configured fallback/replacement rules and pass the selected locale to Optimizely's URL resolver. Resolve the public page without its editor revision; calls without an editor locale use the page's language. Existing origin mappings remain in effect. The original helper method and a default implementation of the new overload preserve existing custom helpers; custom helpers must implement the overload to gain locale-aware behavior.
Add six real-CMS regression cases using persisted language branches, translations, drafts and fallback/replacement settings. They call the installed plugin's PageUrl action and verify Optimizely's public routes and rendered content. No regional paths are manufactured by the plugin.
Validation
The same fixtures ran against the unchanged plugin and then with this fix on current main:
The four failures on both profiles were inherited
en-US, inheritedes-419, translatedfr-CAand replacementen-GB. The translated page returned the English path instead of/fr-CA/page-regionale-traduite/. All four pass with the fix. The published-page draft and missing-fallback controls passed before and after.Evidence: baseline CMS run, passing package/CMS run, passing backend/browser run. These comparison runs used the validation branch. The updated PR head (
1c41966979453188a38c7a1dba5934f7fb509c28) also passed package/CMS CI and backend/browser CI: 13 CMS cases on each profile, package upgrade, 85 backend cases per target and 32 browser cases.See validation details and remaining acceptance for source commits, candidate checksum, reproduction commands and scope.
Remaining acceptance
Real CMS loading, fallback/replacement, URL resolution and public rendering are verified on two locked CMS profiles. Siteimprove responses in those runs are controlled. Live regional Siteimprove report matching is not yet validated; it needs a genuinely crawled regional URL and the protected live workflow, which currently accepts main only.
Customer-specific domains/custom routing, never-published pages, actual draft Prepublish results and live publish-event rechecks remain acceptance checks. No package was published and the shared demo was not changed.