Needs review
Project:
Node Hierarchy
Version:
6.x-2.x-dev
Component:
Drupal/PHP Code
Priority:
Major
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
21 Jul 2010 at 11:40 UTC
Updated:
9 Mar 2017 at 13:50 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dgorton commentedComment #2
asb commentedI can confirm this issue, and it's a nasty one.
'Node clone' should either completely duplicate a node with all it's properties, or clone the core fields and drop the properties; e.g. taxonomy terms and attached images might be duplicated, certain CCK fields might be dropped.
With Nodehierarchy 6.x-2.x-dev it's none of both; the parent seems to become copied, but actually it isn't. And worse, if the broken parent is removed and then re-attached to the cloned node, it still doesn't put it in the node hierarchy. Basically cloned nodes are somehow "damaged" and no longer fully operational in a node hierarchy.
Comment #3
tseven commentedI'd love to see this fixed. Its causing issues on one of my sites.
Does anyone have an idea of how to begin fixing this issue. I have a little time I can dedicate towards fixing it, but it would help if didn't have to start at square 1.
Comment #4
zeezhao commentedSee my post here on how to get around this:
http://drupal.org/node/621662#comment-3297072
Comment #5
afeldinger commentedI've bumped into this issue a couple of times over the last 3-6 months without recognizing it. So today I noticed the connection between errors in the menu tables and cloned nodes and began to investigate.
As best I can tell, the problem is, that the $node->nodehierarchy_menu_links array is reused with all values when cloning a node. Not having a null-value for the mlid property tells menu_link_save to update the existing link, rather then creating a new one.
The node_clone has a hook that will alter the array before either saving or prepopulating the cloned node. This seems to have fixed my issue, but I intend to keep and eye on it. The bug hasn't been very consistent, so it's kind of hard to test whether or not this is working completely.
Anyway, I've implemented the hook in a custom module, but ideally I guess this should be handled in nodehierarchy.module
If anyone else is still experiencing this issue, I'd strongly welcome any input on this issue.
Comment #6
bceyssensComment #7
bibo commentedThis is an old issue, even for D6, but probably still relevant for some on D7 using node clone and node hierarchy.
About the patch in previous comment, it seems pretty long and scary, but its actually mostly just irrelevant whitespace changes (by the editor I guess).
I'm not going to dwell deeper into to details, but the non-irrelevant parts from the patch seem to be:
---
---