With 7.x.2.x-dev, I get this error when I try to reorder items in my menu:

PHP Fatal error: Call to undefined function menu_overview_form_validate() in /usr/local/share/drupal7/includes/form.inc on line 1390

I wasn't seeing this error until I installed Node Hierarchy, and I do see a reference to menu_overview_form_validate in nodehierarchy.module.

Comments

CUclimber’s picture

I'm getting exactly the same error for exactly the same reason. I installed Node Hierarchy today and I can no longer save changes to my menus without getting this error.

tonycpsu’s picture

My temporary workaround has been to comment out line 350 of nodehierarchy.module:

# $form['#validate'][] = menu_overview_form_validate';

Then I can edit my menu. No bad side effects so far.

jorge.suarez’s picture

StatusFileSize
new50.18 KB

I'm affected, too. I did your workaround, but now I can't edit my menus properly. I even uninstalled the module via the uninstall option, and no dice.

Since then, the links list seems to be messed up. By example, the user menu. The «User account» link appears as disabled on the links list, but it's enabled and if I edit it, I can setup it properly from the edit form. So the only thing that seems to be broken is the links list. Saving the menu item, reset it to default options don't seem to help.

This could be NOT Node Hierarchy fault, however. Any ideas on how can I debug this? Can you tonycpsu and CUclimber test this behaviour? I attached a screenshot for better understanding.

Thank you.

CUclimber’s picture

The fix suggested by tonycpsu in Post #2 is working for me, although I'm always just a little uncomfortable with patches like this in production. It does allow me to save changes to my menus with no errors and no apparent side effects.

jbylsma’s picture

Just a word of caution: NodeHierarchy isn't ready for production on 7.x. ronan closed the port issue (#828244-68: Drupal 7 - Port of Node Hierarchy) asking for people to test in non-production environments. I know that there was a very long standing, pretty much stable 6.x dev branch that I was personally using in production envs, but we are striving to leave that mindset behind.

Not trying to be negative, just trying to help avoid any unnecessary headaches!

Cybnext’s picture

StatusFileSize
new7.56 KB

Here is a patch that should fix the re-ordering problem. It also fixes the ability to drag and drop to reorder. Core comes with a table drag JS already in place.

kirby14’s picture

Status: Active » Needs review

This patch also works in my basic testing. D7 core doesn't have menu_overview_form_validate anymore. Does anyone know why it was being called and is there something that needs to replace it in D7?

murz’s picture

Cybnext, with your patch this bug is disappear! Thanks!

jsj9832’s picture

Cybernxt and Murz. Can you please state where should I place the patch. If inside the nodehierachy.module or elsewhere. Thanks.

jsj9832’s picture

Cybernxt can you please state where should I place the patch. If inside the nodehierachy.module or elsewhere. Thanks.

Cybnext’s picture

The changes go in the nodehierarchy.module file.

acbramley’s picture

Patch worked for me too.

murz’s picture

Status: Needs review » Reviewed & tested by the community
carl.brown’s picture

I was having a very similar problem here - trying to reorder menu link items in the draggable table and couldn't save the changes. Applied patch from #6 and am now able to save the changes. Thanks @Cybnext - that's the second time one of your patches has fixed my problems in the past 10 minutes!

jvandooren’s picture

I can also confirm the patch provided in #6 fixes the issue.

eric.toupin’s picture

Fixed reordering menu links fatal error w/ patch listed in #6. Thanks!

pbfleetwood’s picture

Priority: Normal » Major
Status: Reviewed & tested by the community » Patch (to be ported)

Any chance that the patch will be committed to the distribution? In the four months since it was provided, several people have confirmed that it works and none have complained of ill effects.

I'm changing the status of this thread to 'patch (to be ported)'; I apologize if that is not correct--I'm kind of a newb.

pbfleetwood’s picture

Status: Patch (to be ported) » Reviewed & tested by the community

After reading through the documentation on applying a patch, I realized that I should not have changed the status as I did in #17, so I'm changing it back. Sorry about that. :/

organicHack’s picture

Looking at this patch too - does what I need it to (meaning fixes the crash). Also voting to get it committed. Thanks!

organicHack’s picture

Yup. This is a good patch. Fixes a number of bugs. Definitely need to get it in there asap!

jnettik’s picture

Any menu item that node hierarchy created was disabled and I was unable to update it. With the help of patch #6 everything is good again.

+1 to committing this patch.

ronan’s picture

I've applied the part of the patch that fixes the fatal error, but I didn't use the bit that removes the tabledrag override. The purpose of the js override is to have the drag and drop respect the rules of parentage from node hierarchy. If there is a problem with this code (my very brief testing indicates it works ok, but I might have missed something) please open a new ticket and we can figure out what's wrong with it.

Thanks once again for your help everyone.

Happy Holidays!
-R

ronan’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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