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

  1. Install a site in English with a page layout.
  2. Add French and make it the default language.
  3. Open the page layout in the builder, change a text and publish.
  4. 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.

Command icon 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

mogtofu33 created an issue. See original summary.

  • mogtofu33 committed 624c51cd on 1.0.x
    fix: #3632464 Publish the site default language translation
    
mogtofu33’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

pdureau’s picture

Status: Fixed » Closed (fixed)