The patch proposed for this issue is very similar to the patch #40 at #3050027.
https://www.drupal.org/project/entity_clone/issues/3050027#comment-14816729 🐛 Inline Blocks on Layout Builder Fail to Clone Correctly Needs work- 🇧🇪Belgium dieterholvoet Brussels
Any chance we can get this merged? This has caused my company major headaches, data loss for multiple clients. Pretty much every site using translations + entity clone has this problem.
- Status changed to Needs work
almost 2 years ago 1:52pm 13 March 2023 - 🇧🇪Belgium dieterholvoet Brussels
I found another issue: the clone form says Circular reference detected for paragraph fields if the entity has a translation. This happens because both translations of the entity share the same paragraph ID, but a different translation.
Steps to reproduce
I'm assuming a site with two languages, EN and FR.
- Create an EN article called 'Test', with 1 text paragraph.
- Translate the EN article to FR, both the node title and the paragraph text
- Visit the clone form of the FR translation of the article. It will show Circular reference detected under the paragraphs field
- If you clone the node, the paragraph will not be cloned and both nodes will share the same paragraph, which normally shouldn't be possible.
- Status changed to Needs review
almost 2 years ago 2:05pm 13 March 2023 - last update
over 1 year ago 26 pass, 4 fail - Merge request !52Issue #3258535: Translatable entity reference fields are not cloned correctly → (Open) created by dieterholvoet
- Open on Drupal.org →Core: 9.5.x + Environment: PHP 8.1 & MySQL 5.7last update
over 1 year ago Not currently mergeable. - 🇧🇪Belgium dieterholvoet Brussels
I opened a new branch/MR which is rebased against 2.x.
- last update
over 1 year ago 27 pass, 6 fail - last update
over 1 year ago 27 pass, 6 fail - last update
9 months ago 27 pass, 6 fail - last update
9 months ago 27 pass, 6 fail - 🇬🇧United Kingdom kimberleycgm
I've resolved merge conflicts with 2.x and have tested this along with the change from Issue 3050027 🐛 Inline Blocks on Layout Builder Fail to Clone Correctly Needs work mentioned in #12. 3050027 alone didn't fix the issue for me so this is still needed. We're using paragraphs_asymmetric_translation_widgets in our setup, for what it's worth. We also encountered data loss with this so would be grateful to see a release with both fixes.
Attaching the patch file too ( https://www.drupal.org/docs/develop/git/using-gitlab-to-contribute-to-dr... → ).
The last submitted patch, 18: 3258535-MR52-18.patch, failed testing. View results →
- codesniffer_fixes.patch Interdiff of automated coding standards fixes only.- last update
8 months ago 27 pass, 6 fail - 🇪🇪Estonia rang501 Viljandi
Patch in #18 seems to solve the issue. I think it is a major issue because it will cause data loss if you happen to delete one of the nodes.
- Status changed to Needs review
6 months ago 6:26am 2 July 2024 - 🇮🇳India rajeshreeputra Pune
Verified MR!52 and and seems it works as expected, hence requesting review as I have made changes in the MR.
Meanwhile will look into failing tests. - 🇺🇸United States froboy Chicago, IL
It seems like there might be some similar work happening in 🐛 Inline Blocks on Layout Builder Fail to Clone Correctly Needs work .
- 🇫🇷France pbonnefoi
I tried the patch from 3258535-2.x-translatable-entity-reference and fixed my problem of translated entities wrongly cloned when translated from an entity that is not the master of the translations.
- 🇵🇱Poland piotr pakulski Poland 🇪🇺
Hi I applied 3258535-2.x-translatable-entity-reference patch, but as we have many nested node I'm experiencing
Allowed memory size of ... bytes exhausted. I would love to get rid of the checkboxes form or have option to disable it as we are cloning everything. I will check if I can find some walk-around ... - 🇵🇱Poland piotr pakulski Poland 🇪🇺
Alright, it looks like I have a working patch for version 2.1.0-beta1. I've attached the patch for you. I tested it, and it resolves the issue with sub-nodes not having translations properly attached. Please give it a try.
I'll also be preparing a separate patch for the 2.x branch shortly.
- 🇵🇱Poland piotr pakulski Poland 🇪🇺
Ok I prepared patch for 2.x but something is wrong here I can not see a way to created a PR, so please have a look at https://git.drupalcode.org/issue/entity_clone-3258535/-/compare/2.x...32...