Maybe I am missing something, but as far as I can tell there is no way to get the new clone nid from the existing hook.
Please add the ability to get the cloned node id.
This patch adds module_invoke_all('clone_node_saved',$node, $original_node); in the clone_node_save function immediately after node save.
This only works for the clone / edit method not the form clone method obviously.
But this does allow easily cloning uc_attributes and other problamatic cck stuff.
If there is an easier way to get the cloned nid whithout this patch please let me know.
Comments
Comment #1
pwolanin commentedI think this will work:
implement hook_clone_node_alter()
Set some distinctive property on the new $node your module can watch for on hook_nodeapi()
Implement hook_nodeapi and watch the insert op - if the node has the property set, you can act.
Comment #2
pwolanin commentedActually adding such a flag in this module is trivial and might be useful - see if this works for you.
Comment #3
pwolanin commentedoops, this is a duplicate to #654508: Add a way to determinee that a node was a clone
Comment #4
pwolanin commented