When I go to create a new menu I am getting the following:

Notice: Undefined index: menu in nodehierarchy_form_menu_edit_item_alter() (line 362 of sites/all/modules/nodehierarchy/nodehierarchy.module).

I have patched it with the following:

if (isset($forms['menu']) && $form['menu']['#item']['module'] == 'nodehierarchy') {

I wanted to see if there was any down side to doing it and get some feedback

Thanks in advance.

Comments

Cybnext’s picture

Status: Active » Needs review
StatusFileSize
new3.07 KB

Here is a patch that should correct the behavior that you're seeing. This will enable the functionality that is supposed to be there.

it will also remove the parent link drop down since I don't believe that even needs to be there in the first place.

carl.brown’s picture

I was also getting this notice when editing an exisiting link on an existing menu which had been created before installed the Node Hierarchy Module. Applying this patch has got rid of the notice. Time will tell if there are any other problems, but for now, thanks @Cybnext!

jvandooren’s picture

Status: Needs review » Reviewed & tested by the community

Fixed it here too! Haven't noticed any side-effects yet...

heyyo’s picture

After applying this patch i have the folowing errors

Notice : Undefined index: menu dans nodehierarchy_form_menu_edit_item_alter() (ligne 366 dans /home/3u4u/domains/israel-events.com/prod/sites/all/modules/nodehierarchy/nodehierarchy.module).
Notice : Undefined offset: 1 dans nodehierarchy_form_menu_edit_item_alter() (ligne 366 dans /home/3u4u/domains/israel-events.com/prod/sites/all/modules/nodehierarchy/nodehierarchy.module).
Notice : Trying to get property of non-object dans nodehierarchy_form_menu_edit_item_alter() (ligne 377 dans /home/3u4u/domains/israel-events.com/prod/sites/all/modules/nodehierarchy/nodehierarchy.module).

I applyed 4 patches to node hierarchy:

- this one
- http://drupal.org/node/1133810
- http://drupal.org/node/1147944
- http://drupal.org/node/1168348

JakeWilund’s picture

I am also getting these errors after applying this patch.

Cybnext’s picture

StatusFileSize
new3.07 KB

Here is a new patch that should fix the errors that people have been receiving.

Hopefully all my patches can get committed at some point :(

pbfleetwood’s picture

+1

jnettik’s picture

Patch in #6 worked for me as well. And a big thanks to Cybnext cause I think I have a couple of your patches to this module on a site I'm working on.

fernando vesga’s picture

Patch in #6 worked for me too. Thanks a lot!!

Rob_Feature’s picture

Yup, confirmed it worked for me. Can we get this committed?

ronan’s picture

This patch is applied and should go be in the dev release today sometime. Thanks Cybnext and everyone who tested and sorry for the delay.

ronan’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.