Hi,

I'm using node clone with node hierarchy. I can easily clone a child node and it appears where it should. The problem is that when I save the new node, the old node's hierarchy data gets lost. Please help investigating.

Thanks

Comments

zeezhao’s picture

See this post for some insight into why: http://drupal.org/node/621662#comment-3297072

It has some extra fields that need to be set. So I believe node_clone needs to reflex this.

rvarkonyi’s picture

Yeah, I was involved in that conversation too.

Eventually I solved my problem a different way, not using node_clone but using Drupal hooks. What I don't understand in node_clone is that why it has modified the original node and couldn't figure it out in the code either because nothing seems to want to touch it.

pwolanin’s picture

Status: Active » Closed (fixed)
jlea9378’s picture

Title: Modified original node object » Cloning modifies original node's hierarchy assignment
Version: 6.x-1.1 » 6.x-1.3
Status: Closed (fixed) » Active

I am experiencing the same problem when using Node Clone. When cloning a page, it whacks the node hierarchy assignment of the original page. This is very annoying and makes it more or less impossible to use this module without wreaking havoc on my site. =(

Is there a patch to correct this behavior?

jlea9378’s picture

Any update on this issue?

zrodimel’s picture

Version: 6.x-1.3 » 7.x-1.x-dev

Any update?

pwolanin’s picture

Project: Node clone » Node Hierarchy
Version: 7.x-1.x-dev » 7.x-2.x-dev
Component: Code » Drupal/PHP Code

This sounds like a bug with Node Hierarchy. Node Clone depends on e.g. being able to do a node_load() and node_save() on a node to create a new one. If a module depends e.g. on form submission to get the correct data, it's a bug.