Adjustments to the source language are not included in the translation

Created on 4 October 2023, about 1 year ago
Updated 29 May 2024, 6 months ago

Problem/Motivation

When I make adjustments to the source language in Layout Builder, they are not always reflected in the translation. They may appear in the translated node view, but not in Layout Builder of the translated view. So it is not possible to translate the new blocks.

On the other hand, if I delete blocks in the source language, they are still displayed to me in the translation's Layout Builder. There I can not delete them, because you can only translate.

Steps to reproduce

  1. Create Node in source language (DE) and add some sections and blocks with the layout builder.
  2. Create a node translation (EN) and do some translations on the blocks with the layout builder.
  3. Go back to the source language (DE) and add some sections with the layout builder.
  4. Go to the node translation (EN) and check for the new sections, they don't appear.
  5. Now delete a block in the source language (DE) and switch to the Layout Builder in the translated language (EN). The deleted block still appears in the Layout Builder, but cannot be deleted.

Core: 10.1.4

I have rebuilt the cache each time and cron is also running.

Proposed resolution

  1. When new sections and blocks are captured in the source language, they should also appear in the Layout Builder of an already translated language.
  2. When a block is deleted in the source language, it should also be removed by the Layout Builder in the translated language.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Closed: duplicate

Component

Code

Created by

🇨🇭Switzerland handkerchief

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @handkerchief
  • 🇩🇪Germany Duwid

    @handkerchief I can confirm, that this is an issue with core ^10.1.

    As a temporary fix:
    e.g. after deleting the block in source language (DE), switch to Layout Builder in the translated language (EN) and save the Layout Builder before you start editing the blocks. After saving the EN Layout Builder you should see your adjustments.

  • 🇩🇪Germany Duwid

    I updated ticket priority because this breaks the symmetrical behavior.

  • 🇧🇪Belgium LRoels Ghent

    Can confirm this issue. This breaks the editing experience.
    On the other hand, in the node view this issue is not present so it does not break the viewing experience.

    Seems like a big issue to me.

    Can also confirm that the workaround in #2 works. (saving layout builder page of translation)

  • 🇧🇪Belgium LRoels Ghent

    Another update on this:

    This seems to be an error with the layout_builder tempstorage.
    In our case, we had no concurrent editing and all languages should be in sync.
    Because of this, I was able to implement the patch I attached here.

    In this patch I added a presave functionality to clear the LB tempstore and thus display the correct layout in de Layout Builder page.

  • 🇧🇪Belgium LRoels Ghent

    Added an updated version of the patch since there was a bug with non existing section storage.

  • This is probably the same problem that was reported at https://www.drupal.org/project/layout_builder_st/issues/3222423 🐛 Layout translation form reports unsaved changes and becomes stale Needs review , when layout translation form reports unsaved changes and becomes stale.
    Patch #2 of that issue worked for me.

  • 🇩🇪Germany Duwid

    Thank you for pointing this out! I can confirm that the patch from https://www.drupal.org/project/layout_builder_st/issues/3222423 🐛 Layout translation form reports unsaved changes and becomes stale Needs review is fixing this issue. I guess because 3222423 is created three years ago - this issue is a duplicate.

    @LRoels thank for your time and effort, too.

  • Status changed to Closed: duplicate 6 months ago
Production build 0.71.5 2024