Translatable entity reference fields are not cloned correctly

Created on 14 January 2022, almost 3 years ago
Updated 5 September 2024, 3 months ago

Problem/Motivation

The items in translatable entity reference fields do not get cloned, but instead the original reference is kept. This concerns translations of the content being cloned.

Steps to reproduce

  1. Add an entity reference field to a content type, for example field_tags
  2. Make the field translatable
  3. Add a node in language A, add tag "a1" to it
  4. Translate the node to language B, remove tag "a1" and add tag "b1"
  5. View the node in language A, click Clone
  6. Select the tag entity reference to be cloned (check the checkbox)
  7. View the cloned node in language A, it will have tag "a1 - Cloned"
  8. View the cloned node in language B, it will have tag "b1"
  9. Expected result would be that it would have tag "b1 - Cloned"

Proposed resolution

Improve content cloning so that translatable entity reference fields are taken into account.

User interface changes

In the clone form, list the entity references for all translations of the content.

🐛 Bug report
Status

Needs review

Version

2.0

Component

Code

Created by

🇫🇮Finland Rade

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

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024