Cloning a node with existing translations, clones all translations of the node

Created on 18 April 2019, about 5 years ago
Updated 4 April 2024, 3 months ago

On a multilingual site, when cloning a node, all existing translations of the node are cloned. For example, if we have a node with base language English that contains a translation in the French language, attempting to clone the French translation(and only the French translation) of the node into a new node, clones both the French and English translations to a new node. This poses an issue if the cloned content should exist for a chosen language, but not for all languages.

Steps to reproduce:
1.) Install/Enable Quick Node Clone module.
2.) Install/Enable Translation module.
3.) Add language to translation module aside from your default language.
4.) Create a node.
5.) Translate created node into another language aside from default language.
6.) Clone the translation of the created node.

This results in a new node in the translated language as well as the default language.

✨ Feature request
Status

Needs review

Version

1.0

Component

Code

Created by

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

Comments & Activities

Not all content is available!

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

  • 🇧🇪Belgium rp7

    With the patch in #13 some properties are cloned that shouldn't be cloned, such as the path property. This is not the case in how the module originally works. Finetuned the patch a little bit - the outcome is now more close to the original logic.

  • 🇺🇸United States Coufu

    Agreed with #11 let's make this a feature request to provide the flexibility during the cloning process while maintaining the original behavior as default. If a dev updates the module without knowing that a major change is happening in the module, it's going to cause some mass confusion to a lot of those who already rely on the feature to clone all translations along with the parent node.

  • 🇺🇸United States ThanksNeco

    Can confirm as of Jan 2024 in Drupal 10 that the Patch #14 works perfectly. Thank you so much!

  • Status changed to Needs work 6 months ago
  • 🇺🇸United States markdorison

    Please re-roll this change in a merge request so that GitLabCI tests will run against it. Thank you!

  • Status changed to Needs review 4 months ago
  • 🇮🇳India er.garg.karan Chandigarh

    This issue has been fixed with this patch.

  • 🇪🇬Egypt omnia.ibrahim

    Patches are not working with dev version or version 1.18.0

  • 🇺🇦Ukraine Vadym.Tseiko

    Re-roll patch #18, so it can be comaptible with version 1.18.0

  • 🇧🇪Belgium falc0

    Rerolled #14 to work with latest version.
    I saw a lot of added changes to the patches in #18 and #20. Not sure if these are needed and they where not applying.

  • 🇧🇪Belgium falc0

    Made a mistake in #21, updated.

  • First commit to issue fork.
Production build 0.69.0 2024