Postponed (maintainer needs more info)
Project:
Quick Node Clone
Version:
8.x-1.14
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
29 Mar 2022 at 16:25 UTC
Updated:
7 Mar 2024 at 00:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
vflirt commentedIt is not only that if you edit you are editing the source as well but also the relation is to the previous Cohesion entity.
I had to write custom code for hook_cloned_node_alter + to patch the acquia cohesion module in order for this to work cause of how its widget form element is written.
Here is the custom code, this will clone all entityrevision fields that are not paragraphs as they are already handled by quick_clone_node module though I think this makes sense to be done there instead of just only for paragraphs:
I am also attaching the patch for Site Studio.
Comment #3
ljcarnieri commentedThanks for the patch, worked fine for me!
The only problem is that I'm using the cohesion version 8.x-6.9.3, then was necessary create a new patch compatible with this version.
If someone needs, is that attached, I will create an issue in Acquia for the product Site Studio too, maybe this change could be included in the module by them.
Comment #4
ljcarnieri commentedComment #5
ljcarnieri commentedComment #6
scott_earnest commented@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
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.
Comment #7
markdorisonShould this be created as a pull request for acquia/cohesion instead of a patch here?
Comment #8
scott_earnest commentedI 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 maybe adding documentation regarding the custom hook?