Cloning a translation of an entity loads the original entity

Created on 23 February 2024, 10 months ago
Updated 13 September 2024, 3 months ago

Problem/Motivation

When cloning is set up for a translatable entity type and you would trigger the clone for a translation of an entity of that type, the values of the original entity are loaded into the entity form, while you would expect the values of the translation to be loaded.

Steps to reproduce

  • Enable translations for an entity type and/or bundle (a block_content bundle in our case)
  • Configure the content_entity_clone settings for that entity type / bundle, so that at least one value will be loaded into the entity form
  • Create an entity of that type and translate it to another language (so there are 2 versions of the entity: the original and the translation)
  • Go to the Edit-page of the translation and click the Clone local task.
  • The entity form will be loaded with the values of the original entity being prefilled (the values that were configured to be cloned atleast)

Proposed resolution

Add an extra parameter content_entity_clone_language to the query string of the local task, similar to how the entity_id is provided with content_entity_clone. This will allow us to then use that parameter to load the requested translation.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇧🇪Belgium michaelsoetaert

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

Comments & Activities

Production build 0.71.5 2024