Error when updating custom menu in WordPress

by 10 replies
12
Anyone know what this means and how to fix it

Fatal error: Maximum execution time of 30 seconds exceeded in /home/develo25/public_html/wp-includes/formatting.php on line 80

it happens whenever I try to add a page or post to my menu. I hit save menu and get that error. I've already posted on the WP forums, but they are extremely slow there, if they even get to you.My menu has a little over 100 items in it.

If anyone knows what to do that'd be great
#programming #custom #error #menu #updating #wordpress
  • Try to go to the Editor of your themes and in the php file go to line 80, there you might find an answer to your question.
    • [1] reply
    • it's a different line every time. sometimes it's line 34 or 50
  • Try putting this in your htaccess file

    php_value max_execution_time 90

    That will just increase your max execution time form 30 seconds to 90 seconds. The error you are getting is because the script is taking longer than 30 seconds to process. It could be related to you having over 100 items in it like you said. If 90 seconds still isn't enough you can increase it some more.
    • [1] reply
    • Hey, where exactly should I put this? If I just throw it in there it gives my site an error.
  • If you have one of several database backup plugins, this can add considerable overhead when saving in WP. Disable it while you are saving.
  • Is it only happening when you are adding items to the menu?
    • [1] reply
    • If I try to add anymore items than what's on it right now it will give me the error. I'm wondering if the total amount of pages allowed in a menu is 100. I've tried it on different computers on different connections too, so that isn't the issue.
  • Did you ever find a resolution to this issue? I'm having the same problem on a site that is due to launch with kind of a lot of fanfare in 3 days (on Friday) and I'm stressing a bit as I can't modify my menu! Any direction you could provide me with as to what you found to be the problem and/or fix would be greatly appreciated. Thanks!

    J
  • Here's something you can try, but use at your own risk and back up your database FIRST!!

    There are issues with the menu system that are being addressed for future versions of WordPress. One of those is that when you add a page or post as a menu item, the complete text of the page or post is used as the menu item description. It's unnecessary and causes a lot of overhead.

    You'll have to go directly into your database for this, using phpMyAdmin or whatever database management system your hosting company provides. Be sure to use the proper table prefix - usually 'wp_', but your installation may be different.

    Run the following query:
    Code:
    UPDATE wp_posts SET post_content = '' WHERE post_type = 'nav_menu_item'
    Note that after "post_content =" is two single quote marks with no space between, not a double quote.

    The query will remove the post_content of menu items that is used as a description.



    This fix is not for the light-hearted or non-technically savvy, and it may not in fact work. I know people who've had the same issue that have used this and the problem went away, but there are no guarantees.
  • Try to go on 80 line and try to find its way

Next Topics on Trending Feed