Problem/Motivation
An instance takes the site default language when it is created, not the langcode of its config.
On a site installed in English and then switched to French, the builder edits the French translation of an English instance.
Publish saved the English tree in the config itself, which French pages read.
It saved the French tree in a language.fr override, which nothing reads for the default language.
So the draft never matches what is published: the page layout list keeps "Unpublished changes" and the Instances panel keeps its dot.
The Instances panel also compared the other rows in their default translation, not in the language being built.
Steps to reproduce
- Install a site in English with a page layout.
- Add French and make it the default language.
- Open the page layout in the builder, change a text and publish.
- The page layout list still shows "Unpublished changes".
The display_builder_dsfr recipe does this on a fresh install: it imports its page layouts, langcode: fr included, before its config action sets French as the default language.
Proposed resolution
Publish saves the translation in the site default language to the config, every other one to its override, and removes the stale override of the default language.
The Instances panel compares each row in the language being built.
Remaining tasks
Review.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork display_builder-3632464
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #4
mogtofu33 commentedComment #6
pdureau commented