1

I encountered a strange situation. I have a Drupal 6 site with a very large menu tree. I can add new menu items but I cannot rearrange menu items. I can move the items, but when I submit the changes, the menu item gets back to the old position. I tried to disable javascript and set the weight manually, I tried to empty the cache, even disabled it completely. I tried to rebuild the menu with DEVEL, but nothing helped.

I recently upgraded to PHP 5.3.27 so maybe it's related to this. I had some errors about timezone settings, but I corrected this with the timezone set in php.ini. I have no other errors in the log.

If I edit a menu item and set the weight, it works. If I set the weight from the DB, it works. The only thing that doesn't work is the rearranging on the items list page.

Edit: PHP log shows no errors even with E_ALL reporting. I think the problem is with Drupal, as it only lets weights from -50 to 50 and the rearranging can't put the items where I want them. Whe I set weights of more than 50 in DB, the ordering was correct, just until I wanted to change the order withhin Drupal. Then, the manually set items scrambled. Is there a way I can set it up to allow values in a wider range? I don't want to rearrange everything via DB it's a pain in the ass.

0

1 Answer 1

1

PHP 5.3 enforces a max_input_vars (see the accepted answer in PHP Warning: Unknown: Input variables exceeded 1000) and I've seen it create similar errors (page saves yet nothing is saved) when setting permissions for users on sites where there are lots of permissions and lots of roles, so, most probably the same is happening here with the menu UI when it has lots of menu items. To resolve it, bump up the value on your system (see php.net documentation for max_input_vars) until things work again.

7
  • I tried this. Default was 1000 and I set it to 15000 but it still doesn't work. I'll try to change it higher, but I have about 800 items in the menu tree. How high should I set it?
    – Moha
    Sep 25, 2013 at 10:34
  • It still does not work with 150000
    – Moha
    Sep 25, 2013 at 10:43
  • You may want to look at your php error logs and if nothing is in there, perhaps setting the php error reporting level higher to see what might otherwise be causing this. Also make sure you are setting max_input_vars in the right place, I tried setting it in settings.php to no effect when I first came across this.
    – Jimajamma
    Sep 25, 2013 at 13:56
  • Yes, max_input_vars is working, phpinfo shows 150000
    – Moha
    Sep 25, 2013 at 14:42
  • Any info in the php error logs? If nothing there, can you open up a console and look if javascript is failing in your browser?
    – Jimajamma
    Sep 25, 2013 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.