• Hi,On my blog, http:mofa.gov.gh, when I ad a new menu item, more than 60% of my menus get truncated and I have to resort to restoring a backup of the entire website.

    Is there a more simpler way of adding new navigation without the items getting truncated?

    Any help will be appreciated

Viewing 7 replies - 1 through 7 (of 7 total)
  • You’re hitting a semi-well-known issue with WordPress menus. The probme is the amount of POST values that’s sent back with every menu update request.

    The way to “fix” this is to use a php.ini file to increase the max value that can be sent back.

    to do that, you would need to add this in a php.ini file in your `/wp-admin/ folder:

    <IfModule mod_php.c>
    
    php_value suhosin.simulation 1
    
    php_value suhosin.post.max_vars 5000
    php_value suhosin.request.max_vars 5000
    
    </IfModule>
    
    max_input_vars = 5000

    Taht will set you up with 5,000 POST vars, so that should be enough to keep you going for a while.

    Thread Starter Kwabena Akoto`

    (@ghanahost)

    Hi,
    Thanks for your help.
    I created a php.ini file as suggested

    <IfModule mod_php.c>

    php_value suhosin.simulation 1

    php_value suhosin.post.max_vars 5000
    php_value suhosin.request.max_vars 5000

    </IfModule>

    max_input_vars = 5000

    Unfortunately it still did not work even though I raised the values to 10000
    Any help will be greatly appreciated

    Which folder did you save that file in?

    If it doesn’t work you’ll need to talk to your hosting company. Some don’t allow custom php.ini files (not many, but some) so if it doesn’t make a difference they are the only ones that can give you any advice on what you can do to make it work.

    Thread Starter Kwabena Akoto`

    (@ghanahost)

    I saved the file in /wp-admin/ and still had my menus truncated.
    I have asked my host to restore an older backup but the restored backup also came with the truncated men items

    Then you need to ask your hosting company what you can do about a custom php.ini file. They might allow it and they’ll be able to tell you what to do and where it needs to go for their system.

    we are having the same issue. Our server is a dedicated server with our hosting company. I was able to get the info.php to show me what our server is set to.

    the max_input_vars is set to 3000. We need it much higher I believe because of the complexity of our menu.

    another question on the formum suggested that you could create a custom php.ini file that only includes the variable you want to change
    (https://www.ads-software.com/support/topic/phpini-file?replies=7)

    I did this and saw that instead of the increase in the max_input_vars there was a decease from the original setting of 3000 to 1000 with the custom php.ini set at 10000.

    Does anyone have a direction to point us in?

    Thanks

    Lisa

    As I asked above, what folder did you save it in? that does make a difference. It needs to be saved in the /wp-admin/ folder as that’s where it’s needed.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Menu Items get truncated’ is closed to new replies.