Version 2.x of Node Hierarchy says it allows multiple parents, but how do we actually use this feature?

Comments

spacegoat1701’s picture

Status: Active » Closed (fixed)

Actually, I figured it out: I needed to enable the experimental parent select widget.

Melissamcewen’s picture

Component: User interface » Drupal/PHP Code

SpaceGoat1701, do you know what page that is enabled on?

namklabs’s picture

Melissamcewen,

I'm using Drupal 7 (not D6 as this issue specifies), but I would guess that you enable the Parent Select Widget on the Modules page. That's where it's listed for me.

r0bm1lls’s picture

Ah... I have tried using multiple parents in 7. When I enable the alternative widgets all I get is an auto complete field for parents and don't seem to be able to select or specify more than one parent. Do you have this multiple parent ting working on your D7 install Namklabs?

DaPooch’s picture

So does anyone have multiple parents working in the 6.x-2.1 branch? I can't seem to get it to work. I assume you comma separate in the autofill widget but that doesn't seem to do it.

guntervs’s picture

If you go to the configuration page you can select "Allow multiple parents" for the node types that can have multiple parents.

suryabhan barai’s picture

Issue summary: View changes

Hi guntrvs,
you need to make 2 replacement of code in nodehierarchy module's nodehierarchy.module file,
1st replacement at line no:- 615
from:- $form_state['nodehierarchy_expanded'] = TRUE;
to:- $form_state['rebuild'] = TRUE;

2nd replacement at line no:- 787
from:- if (isset($node->nodehierarchy_menu_links[$i]['remove'])) {
to:- if (isset($node->nodehierarchy_menu_links[$i]['remove']) && $node->nodehierarchy_menu_links[$i]['remove']) {

once done it would start working.

suryabhan barai’s picture

suryabhan barai’s picture

Replace line number 576
< $form_state['nodehierarchy_expanded'] = TRUE;
with
> $form_state['rebuild'] = TRUE;

Replace line number 748
< if (isset($node->nodehierarchy_menu_links[$i]['remove'])) {
//---with
> if (isset($node->nodehierarchy_menu_links[$i]['remove']) && $node->nodehierarchy_menu_links[$i]['remove']) {