Saving changes on big menus in Drupal 8

By Bill Seremetis, 7 March, 2018

Occasionally, you might stumble upon a strange error, that happens both on production servers and dev server (ie with the php dev server). You might try to edit (enable/disable/reorder) a menu item in a Drupal menu, but this won't be saved.

This could happen on really big menus, with a lot of items in them. PHP is blocking this change, as a security measure!

For people not running the Suhosin patch, editing the following value in php.ini should do the trick:

max_input_vars

In my case I had to bump this up to 3000!

For those who use the suhosin patch you might need to go a bit further:

suhosin.executor.max_depth = 0
suhosin.executor.include.max_traversal = 4
suhosin.executor.disable_emodifier = Off
suhosin.executor.allow_symlink = Off
suhosin.executor.include.whitelist = phar
suhosin.cookie.max_array_index_length = 256
suhosin.cookie.max_name_length = 256
suhosin.cookie.max_totalname_length = 512
suhosin.get.max_array_index_length = 256
suhosin.get.max_name_length = 256
suhosin.get.max_totalname_length = 512
suhosin.post.max_array_index_length = 256
suhosin.post.max_name_length = 256
suhosin.post.max_totalname_length = 512
suhosin.request.max_array_index_length = 256
suhosin.request.max_totalname_length = 512
suhosin.request.max_varname_length = 256

Tags