This module does not seem to be copying EntityReference fields. As many people are using them, it really should be standard.

Comments

ladybug_3777’s picture

I 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?

koosvdkolk’s picture

The 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

pwolanin’s picture

Status: Active » Closed (works as designed)

Sorry, 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?

koosvdkolk’s picture

Ok, 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?

darol100’s picture

@koosvdkolk,

There is no need to use Node Clone for this functionality. Instead you will need to use Replicate module + Replicate Entityreference.

koosvdkolk’s picture

@darol100: Thanks! Only a pity that the second module is in sandbox status :(