Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This module does not seem to be copying EntityReference fields. As many people are using them, it really should be standard.
Comments
Comment #1
ladybug_3777 CreditAttribution: ladybug_3777 commentedI do not have this problem when I use the module. My Entity Reference fields are cloning just fine. Perhaps another module in conjunction with this is causing your issue? Can you try a more basic install of Drupal (with just node clone and entity, entity reference, and any other dependent modules enabled) and see if you have the same issue?
Comment #2
koosvdkolk CreditAttribution: koosvdkolk commentedThe references are being cloned, but not the underlying entities
So e.g.
Entity 1
- Entity 2
- Entity 3
If I clone Entity 1, I will get
Clone of Entity 1
- Entity 2
- Entity 3
However, I need
Clone of Entity 1
- Clone of Entity 2
- Clone of Entity 3
Comment #3
pwolanin CreditAttribution: pwolanin as a volunteer commentedSorry, but such nested cloning is out of scope here - how many levels of references would you have to follow and clone? Have you considered the problem of circular references?
Comment #4
koosvdkolk CreditAttribution: koosvdkolk commentedOk, thanks, I understand.
If I would like to implement it myself for my specific situation (in which I exactly know what should be cloned), would your API then be sufficient?
I can imagine I would not at least two functions:
- A hook to find out that something is being cloned
- A function which clones a node for me.
The hook I found, the function is clone_action_clone?
Comment #5
darol100 CreditAttribution: darol100 as a volunteer and commented@koosvdkolk,
There is no need to use Node Clone for this functionality. Instead you will need to use Replicate module + Replicate Entityreference.
Comment #6
koosvdkolk CreditAttribution: koosvdkolk commented@darol100: Thanks! Only a pity that the second module is in sandbox status :(