Page editor language switch does nothing when user declines "Create New Language Version?" modal — regression from pre-23.x behavior
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 970
- Forks
- 486
- Avg merge
- 3d 33m
- Merged PRs (30d)
- 170
Description
Problem Statement
In the new page editor, when a content editor switches the language on a page whose contentlet only has a version in the original language, a modal appears prompting "Create New Language Version? Page does not exist in the selected language. Create new version in [language]?" with Yes / No options.
If the user clicks No, the editor does nothing — the language context is not switched, and the existing (original-language) content is not displayed in the editor under the newly selected language.
This is a regression from prior dotCMS behavior. In all dotCMS versions up through 23.x, switching the language on the page editor simply switched the language context on the page — no modal was presented, and the existing content was rendered in the editor under the new language context. The "create a new language version" prompt only appeared when a user switched language from the Page Properties dialog, which was the appropriate place for that workflow.
Forcing upgrading clients into a "create a new language version or do nothing" choice changes a long-standing editorial workflow without an opt-out, and breaks the expectation that the language selector is a context switcher rather than a content-creation trigger.
It is reasonable for the modal to be offered (creating a language-specific page version is a useful capability for metadata, localized SEO, etc.), but declining the modal should fall back to the legacy behavior of simply switching the language context and rendering the available content.
Steps to Reproduce
- Upgrade an instance (or use a fresh evergreen install) where a page contentlet exists only in the default/original language (e.g., Portuguese).
- Open the page in the new page editor.
- In the language selector at the top of the editor, switch to a language for which no version of the page exists (e.g., Spanish).
- The "Create New Language Version?" modal appears.
- Click No.
Observed: The modal closes. The language selector does not change context. Nothing happens — the editor still displays the page in the originally selected language, and the user is given no way to view/preview the page in the newly selected language context without creating a new language version.
Expected (legacy behavior): Clicking No should dismiss the modal but still switch the language context. The page should render in the editor under the newly selected language, using the existing (fallback) language content where no localized version exists. This matches the pre-23.x behavior where language switching on the page editor never popped up a modal at all.
Acceptance Criteria
- When a user switches language on the page editor and the page has no version in the selected language, the "Create New Language Version?" modal continues to appear (current behavior preserved as an option).
- When the user clicks Yes, a new language version of the page is created (current behavior preserved).
- When the user clicks No (or dismisses the modal via the X), the language context is switched to the newly selected language. The page renders in the editor under that language context, displaying the existing content from the available language version as a fallback.
- The user can continue to interact with the page editor (preview, navigate, etc.) under the new language context without being required to create a new language version of the page.
- Behavior in Page Properties language switching is unchanged.
- The fix should not regress the "Yes" path: creating a new language version still works as it does today.
- Verify the regression is fixed against both upgraded instances and fresh installs.
dotCMS Version
Latest evergreen (reported on a client instance that just upgraded to evergreen). Regression introduced sometime after 23.x with the new page editor.
Severity
Medium - Some functionality impacted
Links
Freshdesk ticket: https://helpdesk.dotcms.com/a/tickets/37154
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue in the new page editor with a page that exists only in the original language, then follow the language selector and “Create New Language Version?” modal flow. Done means No or dismissal switches the language context and shows fallback content while Yes and Page Properties behavior remain unchanged; verify on upgraded and fresh installs.
Written by the indexing model from the issue text.
Assessment
- Domain
- content, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100