Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By scampbell on
Hello, thanks in advance for the help.
Any changes I make to my menu structure doesn't stick when I save, whether I changed them by drag-and-drop or by weight.
I have about 375 menu items, counting all the children and grandchildren.
I have tried flushing the caches, and unchecking "aggregate CSS/JS files".
Any other ideas?
Thanks very much!
Comments
Take a look at this thread:
Take a look at this thread: https://www.drupal.org/node/2735797
Let us know if you get it worked out.
Nope
Not the same issue
I'd check recent log messages
I'd check recent log messages and/or take a look at the watchdog table using phpmyadmin. Possibly an uncaught SQL error is keeping your changes from saving?
Maybe create a smaller menu: say 6 items, and try moving those around. That might tell you whether the 375 items in the menu are an issue.
same problem ...
Actually your problem is just a variation on the root problems with the D8 menus admin UI.
Many of us have seen this D8 menu management problem.
You should post about your experience on the "issues" queue for the D8 core menu module.
For a large menu one strategy for management is to export then edit the menu in a yaml file and use the following module to import it each time you make changes:
https://www.drupal.org/project/menu_export
spritefully yours
Technical assistance provided to the Drupal community on my own time ...
Thank yous appreciated ...
Do you think elpuzzo's fix
Do you think elpuzzo's fix for his issue might also fix the issues of all the menu links disabling when you rearrange and save the order on the Admin>Structure>Menus>Menu page?
Increase max_input_vars
Just had the same problem and checked here before looking at the error logs.
Error logs said max_input_vars exceeded the default value of 1000 when submitting this page, so I increased it and all fine now.
elpuzzo - what did you
elpuzzo - what did you increase it to? thx
I usually double the value
I usually double the value, but in this case I used 5000.
Thanks - my issue is the menu
Thanks - my issue is the menu links all becoming disabled when I try to rearrange and save them on my main navigation menu page. I was thinking of trying this to see if that also fixes that problem.
I'm afraid this won't help
I'm afraid this won't help here because if PHP receives more than the set amount of variables, it stops and doesn't process them at all (so doesn't save any changes).
Where do you edit that?
Glad you found a fix! I'm newer to Drupal and not sure where to change this. Is it in the backend GUI, or a certain code file? Thanks.
This is a PHP setting, in
This is a PHP setting, in this case it can either be set directly in the php.ini or in the .htaccess file.
Since you probably run on a hosted plan, I would try to adjust the .htaccess file.
First, create a new file with the name phpinfo.php and add this code to it
Save it and load it into the root of your Drupal installation. Open yourdomain.com/phpinfo.php in your browser, search for max_input_vars, note down the values listed there.
Now edit the ".htaccess" file in the root of your Drupal installation, and where there is
Add a new line:
php_value max_input_vars 5000
Save the file and reload the phpinfo.php in your browser. Check if the local value has changed to 5000. If so, you can try saving the menu again. If not, you might have to ask your provider/admin how to change max_input_vars in your php.ini.
Important, delete phpinfo.php after you're done!
No need for hphinfo . php when having access to admin
As was pointed out to me as well, there is no need to create the phpinfo.php file. That info is also available as admin/reports/status/php.
Reports->Status report->more information in the php section.