Editing a clone before saving changes the source node.

Created on 29 March 2022, about 2 years ago
Updated 7 March 2024, 4 months ago

Problem/Motivation

Editing a clone before saving changes the source node.

Steps to reproduce

This is happening on a site using Acquia Site Studio, (formerly called Cohesion).

Clone a node and in the clone swap out some components, (a Site Studio building unit) and then save the clone.

The changes are reflected in both the clone and the original node.

Proposed resolution

Possibly offering the configuration setting to pre-saving the node before presenting it for editing.

πŸ› Bug report
Status

Postponed: needs info

Version

1.14

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States bkelly

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.

  • πŸ‡ΊπŸ‡ΈUnited States scott_earnest

    @vflirt - thank you for this fix - it works great and I would like to give RTBC+1 for us with:

    - Drupal 10.1.8
    - PHP 8.2.16
    - Cohesion/Site Studio 7.2.1

    Some important notes for those applying the fix:

    1. The patch works in conjunction with the code snippet in Comment 2 πŸ› Editing a clone before saving changes the source node. Active

    2. The patch is for the package acquia/cohesion, not quick_node_clone, so if you are having issues applying with composer make sure the correct package is specified.

    "acquia/cohesion": {
        "3272297 - Editing a clone before saving changes the source node (quick_node_clone)": "https://www.drupal.org/files/issues/2022-11-22/editing_a_clone_before_saving_changes_the_source_node-3272297-5.patch"
    }
    
  • Status changed to Postponed: needs info 4 months ago
  • πŸ‡ΊπŸ‡ΈUnited States markdorison

    Should this be created as a pull request for acquia/cohesion instead of a patch here?

  • πŸ‡ΊπŸ‡ΈUnited States scott_earnest

    I was not quite sure how to move the ticket along, but I would agree a patch should be in the acquia/cohesion issue queue, but also the code snippet is necessary for this fix to work. Perhaps moving to the correct issue queue is a start, then may just adding documentation regarding the custom hook?

Production build 0.69.0 2024