I am very excited about this module. Here's what I want to do:

I want to be able to create non-linear documents where nodes can be linked to each other in a non-hierarchical way. I understand that this makes a hierarchical menu difficult - that not a problem for me. I am using the D7 port which is largely up and running with a few glitches. If I can indeed assign multiple parents to a node then I can achieve my objective. I may be doing something dumb but I can't find a way of assigning more than one parent in the D7 port. The normal drop down list only allows one item to be selected. The alternative widget seems to be an auto-complete field but still only allows one parent to be selected.

Any insights would be very welcome. Once again - great module and in my view a better alternative to book pages which has menu issues.

Comments

alexbern’s picture

Looking for the same!

Can't figure out how to set a node to more than one parent. There's a checkbox in content type settings to allow multi parents. No changes when set.
I need this to have the same node in 2/3 different sections. In each, the node shall have the parent's breadrumb displayed.

r0bm1lls’s picture

Hmm - so now I'm thinking either its not working in the D7 port yet or that multiple parents actually means assigning a child to parent of different content types. This is all guesswork at this point. I may try this on a test D6 installation to see if something is different there. Will report on findings.

Anyhow I think this is a really great module and am really looking forward to it growing.

edit:
I set up on a D6 install. The difference is that on the D6 version there are two parent fields in the node edit page one to assign a primary parent and another to assign another parent. The second field to assign another parent is missing in the D7 port. Not sure what the intention was here.

alexbern’s picture

what a good idea to compare it w D6version! Maybe they've just forgot this issue to port. I should have a look at the code.

keithm’s picture

Title: Multiple parents » Cannot assign multiple parents
keithm’s picture

Category: support » bug
keithm’s picture

Status: Needs review » Fixed

This problem is due to a bug in Drupal core. See #1015798: Fieldsets inside vertical tabs have no title and can't be collapsed. The patch in comment #7 fixed it for me. To use it, save the file to your Drupal root directory and type patch -p0 < vertical-tabs_collapsed-fieldsets_1.patch in a terminal or shell window. Windows users see http://drupal.org/node/620014 for instructions.

keithm’s picture

Status: Active » Needs review
StatusFileSize
new1.63 KB

There are some problems in nodehierarchy as well. Patch attached.

Just to be clear, the core patch in #6 is still required.

r0bm1lls’s picture

Thanks guys for all this. Tried the patch in #7 did not seem to go completely:

patching file nodehierarchy.module
Hunk #1 succeeded at 535 (offset -27 lines).
Hunk #2 FAILED at 698.
Hunk #3 FAILED at 1530.
2 out of 3 hunks FAILED -- saving rejects to file nodehierarchy.module.rej

Sorry I'm no coder so would not know what went wrong.

Also would that patch in D7 core be implemented in D7.2?

r0bm1lls’s picture

Oops sorry, my bad. Tried patching the wrong version. Applied patches to core and to module and it works!!! Thanks so much. Now lets see what fiendish constructs I can contrive with this module....

keithm’s picture

Status: Fixed » Needs review
StatusFileSize
new915 bytes

I pulled a piece of patch #7 into a separate patch in #1168348: Warnings produced when creating nodes and rerolled the patch for this issue.

To fix this problem and enable the ability to assign multiple parents:

  1. Apply the patch attached to this comment.
  2. Patch Drupal core to enable fieldsets inside vertical tabs. Use the patch in comment #7 of #1015798: Fieldsets inside vertical tabs have no title and can't be collapsed. To use it, save the file to your Drupal root directory and type patch -p0 < vertical-tabs_collapsed-fieldsets_1.patch in a terminal or shell window. Windows users see http://drupal.org/node/620014 for instructions.
lebachai’s picture

I had no trouble apply your attached patch, but the vertical-tabs.css patch looked like it was from the 8.x version, not 7.x. Am I mistaken?

graytoby’s picture

Status: Needs review » Active

No luck. I tried all patches, I'm still unable to select multiple parents. I only get selection list and I can only select one node. The same applies to autocomplete widget, only one node can be entered as a parent.

JayKayAu’s picture

I'm getting the same problem. This is true both with and without the experimental Node Hierarchy Widgets module enabled.

Anonymous’s picture

I am experiencing the same issue, the following error is displayed on Node View and Node Edit pages when multiple parents is enabled:

Notice: Undefined property: stdClass::$nid in nodehierarchy_nodehierarchy_node_form() (line 543 of /var/www/otdomainaccess/sites/all/modules/nodehierarchy/nodehierarchy.module).

Applying the aforementioned patch to drupal core fixes the issue.

Ganzeiba’s picture

Same problem here, can't add more than one parent in the Node Hierarchy > Parent field even if the option "Allow multiple parents" is active.

alexh’s picture

The patch in #10 with the mentioned core patch solves this issue for me. Thanks a lot!

Courtney.B’s picture

Ran patch #10, able to select multiple node parents.

skaught’s picture

Title: Cannot assign multiple parents » inner fieldsets missing

add this CSS into your theme should help with the missing fieldset (which is the result of a vertical tabs css issue). however the actual 'add' button doesn't actually work.

div.vertical-tabs .vertical-tabs-panes .collapsible legend {
    display: block;
}

div.vertical-tabs .vertical-tabs-panes .collapsible .fieldset-legend {
    margin: 0;
    position: relative;
}
Anonymous’s picture

I didn't need the patch, just the CSS is enough.
But one issue remains. Maybe the patch will help me there, I'll try in a minute.

Men you make a node that needs multiple parent from scretch or edit one, you can allow multiple parents.
But when you assign a child node than that node only saves under that parent, you need to click on edit to apply it to multiple parents...

He, it's in the good direction !!!

I also still get errors when I wont the widget module is enabled.
But hé, as I just said, I didn't try the patches yet.

Love the module, good work, keep going.