nav-menu.php failure with adding menu items
-
Hi all,
I went to add a custom link, just actually a hash link because it was the top item and i just wanted it to be a button.
Anyway, I got this error:
Allowed memory size of 33554432 bytes exhausted (tried to allocate 122880 bytes) in /home/scottish/public_html/website/wp-admin/includes/nav-menu.php on line 653
It happens when I try to add any other page. That line of code is:
if ( ! empty( $_REQUEST['quick-search-posttype-' . $post_type_name] ) ) { $current_tab = 'search'; }I thought it might be something to do with the fact that I tried to add a hashed custom link but I when I try to do anything with the nav bar now, it just fails.
Tried commenting out that code but the whole menu part of wordpress stopped working.
Help!!!
-
Try increasing the memory available to PHP:
http://ww.wp.xz.cn/support/topic/253495#post-1017842Had a look and tried to increase the memory by adding a line in the wp-config file but no luck.
I’ll try doing some other research and following your lead. I hope I can fix it. 🙁
Thank you for your reply.
None of those methods worked. I contacted my host. What did work is:
Going to wp-includes/wp-constants.php…
changing the line of code:
if ( !defined('WP_MEMORY_LIMIT') ) { if( is_multisite() ) { define('WP_MEMORY_LIMIT', '64M'); } else { define('WP_MEMORY_LIMIT', '32M'); } }I increased both by 16mb and that fixed it. I suppose if it didn’t work, you could increase by more.
Hope this can help others. 🙂
Don’t edit core files unless you really, really, know what you are doing. Not only could you bring your entire site down but you could also inadvertently create a security issue that might increase the risk of your site being hacked.
I tried everything else and I didn’t manage to fix the issue.
This is the advice the host of my server gave me.
I completely understand what you’re saying, but what would you suggest otherwise for me to try to avoid editing core files?
Your hosts need to resolve the issue via your server.
The topic ‘nav-menu.php failure with adding menu items’ is closed to new replies.