Closed (fixed)
Project:
Node clone
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
8 Dec 2009 at 17:32 UTC
Updated:
9 May 2014 at 01:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
svendecabooterI'd like to see this as well.
Attached is a simple patch that would accomplish this.
Comment #2
pwolanin commentedLooks simple enough - thogh I might make the name of the hook a little longer.
Also - I guess this will never run in the pre-populate case?
A better alternative might be to add some flag to the node that you could pick up when the normal node hooks run during node_save()
Comment #3
pwolanin commentedmarking this other issue as duplicate #853776: Proposed Hook, and moving the patch here.
Comment #4
pwolanin commentedComment #5
pwolanin commentedComment #6
pwolanin commentedprobably no harm in adding this for both methods.
Comment #7
pwolanin commented5.x-2.x and 5.x-1.x patches
committed all to CVS.
Comment #9
dwwSorry, but this doesn't do anything at all in the prepopulate case. The fact that you stuff something into $node isn't propagated at all through the whole node_form() mess such that by the time another module is in nodeapi('insert'), the handy clone_from_original_nid flag is gone. So, any functionality that's trying to tell if a node is being cloned (e.g. #1205304: Clone the panels display if using node_clone to clone a panelized node) only works if you configure node_clone to use the save-edit method.
For now, I just need to try to get this working, so I'll require save-edit, but it'd be really nice to get this working for real in both methods so that other modules can actually use this stuff.
Thanks,
-Derek
Comment #10
dwwNevermind, that bug now lives over at #939016: Use $node->clone_from_original_nid consistently. I'll reply there.