Hi,
The multiple parents functionality doesnt seem to work. I'm using a fresh install of drupal 7.12 + nh 7.x-2.x-dev of 2012-Feb-08
Can have multiple parents tick box in the settings is ticked for Basic page node type.
In the node edit screen, where the "add new parent" fieldset should be, is nothing.
I've tried to fix it myself but i cant.
Can you try to reproduce on a fresh install of Drupal 7.12?
Thank you
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | interdiff-1458534-7-14.patch | 3.94 KB | roderik |
| #14 | multiple-parent-1458534-14.patch | 5.06 KB | roderik |
| #7 | multiple-parent-1458534-7.patch | 2.84 KB | johntarling |
Comments
Comment #1
stealthtech1 commentedHi,
I found the problem at line 557 in nodehierarchy.module in 28/Feb build.
This line:
$form['nodehierarchy_menu_links'][$key + 1]['#collapsible'] = $form['nodehierarchy_menu_links'][$key + 1]['#collapsed'] = TRUE;Comment #2
stealthtech1 commentedOk spoke too soon. The form shows but doesn't submit
Please can someone have a look
Comment #3
stealthtech1 commentedI got this to work by changing this line:
if (isset($node->nodehierarchy_menu_links[$i]['remove'])) {to this:
if (isset($node->nodehierarchy_menu_links[$i]['remove']) && $node->nodehierarchy_menu_links[$i]['remove'] == TRUE) {nodehierarchy.module around line 740
Comment #4
heyyo commentedeven with #3 other parents are not saved for me
Comment #5
Wolfgang Reszel commentedIt could be a to low module weight.
Comment #6
cotasson commentedI am having the same problem.
The feature "add a parent" is shown, but adding a parent is not saved.
Following...
Comment #7
johntarling commentedI had a go at fixing this. I've done a little testing locally but it could use some more. This is a patch against the current 7.x-2.x dev.
John
Comment #8
kristygislason commentedI tried applying this patch and it seemed to allow multiple parents. However, it affected the menu link title. I was no longer able to change the menu link title. Upon saving the node, the title was reset. It did not take my changes. It seems to be related to an issue a while back - http://drupal.org/node/1147944. Removing the patch resolved the issue with editing the menu link title.
Comment #9
chrislabeard commentedAny update on this issue?
Comment #10
chrislabeard commentedI also have noticed when trying to add another parent and you click add it just refreshes the page and doesn't do anything.
But if you type in the parents and click save it will save the parent, and seems to work fine.
Comment #11
buttonwillowsix commentedI have noticed the same issue, and like #10, notice that if you type in the parent and click save, it works fine. BUT if you go back and edit the page again, the parent is lost.
Comment #12
HairMachine commentedIt seems the 'Add' button is indeed broken, you can only save a parent by adding one and clicking to save the node. However, when you do this, it saves over the non-default parent rather than adding a new one as it should.
Looking through the code, there seems to be an issue where if you have more than two parents, the 'middle' parent is coming back as disabled (there is a setting in the $node object, enabled = false, which is set when it seems that it shouldn't be). If I can find out what is happening I'll have a go at a patch.
Edit: #7 looks pretty good in theory.
Comment #13
HairMachine commentedApplied patch #7 and it seems to work a treat :)
I'm not getting the resultant issue described in #8 either.
Comment #14
roderikFor me, #7 worked on my test site, and not on my live site. Very strange, and hard to debug.
But what struck me before that, is that this UI paradigm (first entering a parent, then pressing "Add") is not the same as the 'usual' one for other fields (where you first press "Add another item" and can then fill & save the form as usual).
So I changed that instead of trying to debug the patch in #7.
(A note: the "Remove this parent" checkboxes now strike me as superfluous - you could just remove the field if it's empty, right? But I'm not sure if there is extra logic I'm missing --something with enabled/disabled links-- so I haven't removed those.)
Comment #15
Gabo11 commentedHi everybody!
Roderik is your patch working well on product website?
I need to find a solution for a customer that wants to have the same page under 3 different parents!
And before I read an issue about loosing the multiple parents when editing the node; how does it look to you?
Thanks!
Comment #16
Gabo11 commentedComment #17
strings6 commentedHello,
I know it's been a couple of years since the last comment, but I ran into this same problem on a site I inherited, where we were hired to upgrade the site from D6 to D7.
Long story short, I applied the patch in #7 to the D7 site, and it works perfectly. Any chance anyone that manages this module would apply the patch and post a new stable release for D7?
Thanks much for your consideration.
Comment #18
strings6 commentedUPDATE: We are seeing a problem with node hierarchy post-patch when there is only ONE parent now. The patch fixed the case where a content type should be allowed to have more than one parent. But for other nodes that we setup to only get one parent, we are seeing that it doesn't save the parent. This is the case when we are making a brand new node, or trying to edit one that existed back in the D6 days. I'm trying to figure out why this would be.