I have a custom code to create a wiki type node when i create an og type node (with hook_nodeapi -> insert).
When i create a node hierarchy with an og node as a child, the Node Hierarchy module creates a relation with the wiki node too.

So, to solve the problem, i added a verification in node_hierarchy_insert_node to see if $node->parent is defined :
if ($node->nid && isset($node->parent) && (($node->old_parent !== $node->parent) || $node->old_parent === NULL))
instead of
if ($node->nid && (($node->old_parent !== $node->parent) || $node->old_parent === NULL))

Thanks,

--
Samuel

Comments

markhalliwell’s picture

Component: Code » Drupal/PHP Code

Copy & Pasted: This issue pertains to the 6.x-1.x branch which is now legacy and is over two years old. If this issue is not applicable anymore, please consider closing it. Otherwise, please update this issue appropriately. Will be closed in two weeks if no response.