Problem/Motivation

When a layout is cloned, it tries to set the language of the inline block to the target entity's language. When the source inline block has translations, they also get cloned, and we get an error that a translation exists.

Steps to reproduce

This issue only occurs, if a contrib module like tmgmt is adding a translation to an inline block via API.

Proposed resolution

In order to make tmgmt work with layout_build_at also, it's handy if it would copy translated value into the clone layout instead. The same approach is being used in a patch for entitiy_clone, which we can apply here also.

1. copy all the values from the fields
2. delete the translation
3. set the target language
4. update all translated fields

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

phma created an issue. See original summary.

phma’s picture

Issue summary: View changes
phma’s picture

Status: Active » Needs review

phma’s picture

froboy’s picture

Status: Needs review » Closed (duplicate)
Related issues: +#3286719: Fails on translated inline blocks

This seems like it might be a duplicate of #3286719: Fails on translated inline blocks. That's had a little bit more testing, so I'd recommend we consolidate efforts there.

dieterholvoet’s picture

Status: Closed (duplicate) » Needs review

@froboy you closed this issue as a duplicate of itself. Did you mean to reference a different issue? If so, which one? Because we're currently encountering this issue on a project.

dieterholvoet’s picture

Status: Needs review » Reviewed & tested by the community

For the record, we're encountering this issue without having TMGMT installed. I tested the MR and I can confirm that it fixes the issue.

svendecabooter’s picture

Would indeed be good to get some clarification regarding the issue where this issue is also being fixed currently...
I've searched the issue queue for this module, but can't find one ATM.

  • svendecabooter committed 34931b1b on 8.x-2.x
    Issue #3286719 by phma, dieterholvoet, svendecabooter: Fails on...

  • svendecabooter committed 0c75e8e2 on 3.0.x
    Issue #3286719 by phma, dieterholvoet, svendecabooter: Fails on...
svendecabooter’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for the MR & reviews.
Committed now.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

taran2l’s picture