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
Issue fork layout_builder_at-3286719
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 #2
phma commentedComment #3
phma commentedComment #5
phma commentedComment #6
froboyThis 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.
Comment #7
dieterholvoet commented@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.
Comment #8
dieterholvoet commentedFor the record, we're encountering this issue without having TMGMT installed. I tested the MR and I can confirm that it fixes the issue.
Comment #9
svendecabooterWould 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.
Comment #12
svendecabooterThanks for the MR & reviews.
Committed now.
Comment #14
taran2l