cant create custom menu - page not found

I have a TwentyEleven site with all plugins disabled and I am still getting a 'page not found' when I try to add a new custom menu.

I updated to 3.4.2 form a slightly older version and this did not fix the problem.

I tried a different theme and this also did not fix the problem.

I tried going back to the default htaccess file from my more secure version and this did nothing either.

the site is http://www.1.geomagnetballs.com
on a HG shared server.

I am not a programmer so please keep suggestions suitable for dummies or give clear instructions :wink: - Of course I can give you access if you would care to look inside ...

  • Dean Kaus

    Hello @Narada I was able to see most of your pages. the one thing I did notice is that if i clicked on the header title and didn't wait for the drop down to appear in the menu item Auto Pages then I got the error page not found.

    First thing I'd try would be to change your permalink settings. If memory serves me I use the %post% selection and that usually solves a lot of my problems.

    I was going to dig around a little bit more but thought that I'd wait to see if that fix's anything. I also noticed that some of your shortcodes weren't working and that may be due to not using the theme that they are connected to.

    Let me know if this helps

  • Timothy Bowers

    I have a TwentyEleven site with all plugins disabled and I am still getting a 'page not found' when I try to add a new custom menu.

    So this is happening in the backend as you try to add a new custom menu?

    Just wanted to check as the link is for the front end naturally so not sure where we could see this happening?

    Can you log in with FTP and then rename the /plugins/ folder, name it anything you wish.

    This temporary disables all your plugins (just don't load the plugin admin page otherwise it deactivates them all until you manually activate each one again). Does it work then? What about when you re-save those permalinks?

    That should let us know if there is some kinda plugin conflict.

    Take care.

  • Narada

    Hi - thanks for your replies guys.
    I have done what you requested and renamed the plugins folder.
    The problem persists.
    I renamed permalinks to %post% (from %postname% which I think is normal no? ).

    The 'shortcodes' you mention are actually meant to look like that as this site is going to be cloned with a plugin that used those CAPTEXTS as replaceable 'tokens' when the site is copied.

    This is an important issue for me because I have already copied this site a few times and used it with different themes, and the problem has been copied over to all these sites. I would hate to have to start again :slight_frown:

    I am very happy to give you login details but saw a message saying not to do that here. Plese tell me where to send the login details.

    To make sure you are clear on the exact problem ...
    On the Appearance/Menu page in Admin I click the AddMenu + sign next to the already created custom menu and I am taken to the 'page not found' page. I can edit the already created custom menu - just not create new ones.

    Disabling all plugins, changing permalinks, and changing theme do NOT effect this problem. Also updated the WP core does NOT solve the problem. I have left the site now with the plugin folder renamed and the permalinks changed to %post% .

    Thanks muchly - Dan V

  • Narada

    I am on Hostgator shared/reseller hosting. I very much doubt that their servers are not capable of running WP. They have a great reputation for compatibility of their servers with a lot more than just basic WP. Are you really so sure this is a modsec problem? Do you mean that every other member here with shared HG hosting has the same problem of not being able to make custom WP menus??
    Okay I will ask them to look into it just in case ...

  • skopy9581

    i had the same problem while i configured my server,had the default rules that blocked some functions of wp declaring them as injection, so i was just sayin it smells like modsec.. the htaccess override doesent work with modsec2 btw; you would have to edit vhost entry and there is a separate log for it, depends on configuration; no point bothering you with it while you are not shure that modsec is the fault...

    you can not browse fresh install of wp and that the menus are not working, its a server issue and the error must be in logs....

  • Timothy Bowers

    Do you mean that every other member here with shared HG hosting has the same problem of not being able to make custom WP menus??

    I doubt everyone would be on the same shared server and it's entirely possible one setup is different to the next.

    I just checked that a new clean install on the same server does not have this problem - so I guess this clears the server.

    So a clean install works as expected then?

    It looks like I will have to hire a developer to troubleshoot it for me ... :slight_frown:

    If it is something real complex then you might need to but I could I take a quick look?

    If so then please send in:

    - Mark to my attention
    - Link to this thread
    - Full admin/network access
    - Full FTP

    https://premium.wpmudev.org/contact/

    Take care.

  • Narada

    Thanks for offering Timothy - I have done that now. You did not ask for cPanel so I have not given it but will do so if you need it.

    Yes a clean install on the same reseller account works as expected.
    I even set up the permalinks and various other things to mimic this problem site and still the new install works.

    I have about 5 developed sites cloned from this test site though that all replicated this problem so it would be great to find out what the problem is rather than going back to start again with all these sites.

    Dan V

  • Timothy Bowers

    Hey there.

    I took a look and then did the usual debugging stuff to be sure. I then went fishing and found:

    http://core.trac.wordpress.org/ticket/14134

    It may or may not be related to this, but it's worth looking into.

    I couldn't check your error logs, didn't see them. Could you let me know what is in them?

    It might also be worth consulting with your host and giving them the link above. They should be able to see if that's the issue or not.

    Let me know what they say and the error logs.

    Take care.

  • Narada

    When I go to cpanels error logs it does not show anything. Im guessing that cpanel does not see any error in a WP 'page not found' message? Or is this not the way to access my error logs?

    The actual link on the +tab to create a new menu reads - http://1.geomagnetballs.com/wp-admin/nav-menus.php?action=edit&menu=0
    I have checked and this is the same address as on a site which does not have this problem. So the address is right but the code is apparently wrong :slight_frown:

  • Narada

    ahhhh I may have found a simple solution.
    I saved the current wp-admin and wp-includes folders and uploaded new ones from the install folder.
    No more problem ...

    Im not sure what that indicates... but I can live with it LOL.

    Anyone care to comment on any problems that might be caused by doing this? Are there any files in these folders that are written to by WP? Is it usually safe to do this?

  • Timothy Bowers

    ahhhh I may have found a simple solution.
    I saved the current wp-admin and wp-includes folders and uploaded new ones from the install folder.
    No more problem ...

    Sorry just so I understand you replaced the wp-admin and wp-includes with a fresh set?

    And it now works?

    If so then that is really odd because I removed those files and uploaded a fresh set over FTP.

    Or do you mean something else?

    Thanks.

  • Timothy Bowers

    I have done it one three sites now and it fixes the problem.
    Its not likely to cause any other problems is it?

    Nah there is nothing special in those, as in nothing custom unless you or someone else did it.

    The only files which are custom are htaccess, wp-config.php and the contents of your /wp-contents/ folder, i.e. uploaded media (mainly), themes, plugins

    So if you did the same thing and tested and it didnt fix it that is very strange ....

    Well that's what's puzzling me because I backed them up first locally just in case, then I removed them and then uploaded a fresh set. I did it to ensure nothing was missed on the last update.

    The end result is that it's working, so that's the main thing. :slight_smile:

  • Narada

    I did some more testing and ... I think it was this line of code in the htaccess file inside the Admin folder causing the problem.

    RewriteRule .* - [F]

    I suspect that I added this htaccess file on the recommendation of a site specialising in WP security. :slight_frown:

    The rest of the file seems okay -
    I have posted it here below in case anyone would like to point out any other problematic codes ?

    I guess I will just remove it completely for now...
    ________________

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # security stuff
    RewriteEngine On
    Options -Indexes
    ExpiresActive On
    ExpiresDefault A0
    <FilesMatch ".(gif|jpg|jpeg|png|swf)$">
    # 2 weeks
    ExpiresDefault A1209600
    Header append Cache-Control "public"
    </FilesMatch>
    <FilesMatch ".(xml|txt|html)$">
    # 2 hours
    ExpiresDefault A7200
    Header append Cache-Control "proxy-revalidate"
    </FilesMatch>
    <FilesMatch ".(js|css)$">
    # 3 days
    ExpiresDefault A259200
    Header append Cache-Control "proxy-revalidate"
    </FilesMatch>
    <Files wp-config.php>
    Order Deny,Allow
    Deny from all
    </Files>
    <Files .htaccess>
    Order Allow,Deny
    Deny from all
    </Files>
    # 5G BLACKLIST/FIREWALL
    # @ http://perishablepress.com/5g-blacklist/
    # 5G:[QUERY STRINGS]
    <ifModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{QUERY_STRING} (environ|localhost|mosconfig|scanner) [NC,OR]
    RewriteCond %{QUERY_STRING} (menu|mod|path|tag)\=\.?/? [NC,OR]
    RewriteCond %{QUERY_STRING} boot\.ini [NC,OR]
    RewriteCond %{QUERY_STRING} echo.*kae [NC,OR]
    RewriteCond %{QUERY_STRING} etc/passwd [NC,OR]
    RewriteCond %{QUERY_STRING} \=\\%27$ [NC,OR]
    RewriteCond %{QUERY_STRING} \=\\\'$ [NC,OR]
    RewriteCond %{QUERY_STRING} \.\./ [NC,OR]
    RewriteCond %{QUERY_STRING} \? [NC,OR]
    RewriteCond %{QUERY_STRING} \: [NC,OR]
    RewriteCond %{QUERY_STRING} \[ [NC,OR]
    RewriteCond %{QUERY_STRING} \] [NC]
    RewriteRule .* - [F]
    </ifModule>
    # 5G:[USER AGENTS]
    <ifModule mod_setenvif.c>
    SetEnvIfNoCase User-Agent ^$ keep_out
    SetEnvIfNoCase User-Agent (casper|cmsworldmap|diavol|dotbot) keep_out
    SetEnvIfNoCase User-Agent (flicky|ia_archiver|jakarta|kmccrew) keep_out
    SetEnvIfNoCase User-Agent (libwww|planetwork|pycurl|skygrid) keep_out
    SetEnvIfNoCase User-Agent (purebot|comodo|feedfinder|turnit) keep_out
    SetEnvIfNoCase User-Agent (zmeu|nutch|vikspider|binlar|sucker) keep_out
    <limit GET POST PUT>
    Order Allow,Deny
    Allow from all
    Deny from env=keep_out
    </limit>
    </ifModule>
    # 5G:[REQUEST STRINGS]
    <ifModule mod_alias.c>
    RedirectMatch 403 (https?|ftp|php)\://
    RedirectMatch 403 /(cgi|https?|ima|ucp)/
    RedirectMatch 403 /(Permanent|Better)$
    RedirectMatch 403 (\=\\\'|\=\\%27|/\\\'/?|\)\.css\()$
    RedirectMatch 403 (\,|//|\)\+|/\,/|\{0\}|\(/\(|\.\.\.|\+\+\+|\||\\\"\\\")
    RedirectMatch 403 \.(cgi|asp|aspx|cfg|dll|exe|jsp|mdb|sql|ini|rar)$
    RedirectMatch 403 /(contac|fpw|install|pingserver|register)\.php$
    RedirectMatch 403 (base64|crossdomain|localhost|wwwroot|e107\_)
    RedirectMatch 403 (eval\(|\_vti\_|\(null\)|echo.*kae|config\.xml)
    RedirectMatch 403 \.well\-known/host\-meta
    RedirectMatch 403 /function\.array\-rand
    RedirectMatch 403 \)\;\$\(this\)\.html\(
    RedirectMatch 403 proc/self/environ
    RedirectMatch 403 msnbot\.htm\)\.\_
    RedirectMatch 403 /ref\.outcontrol
    RedirectMatch 403 com\_cropimage
    RedirectMatch 403 indonesia\.htm
    RedirectMatch 403 \{\$itemURL\}
    RedirectMatch 403 function\(\)
    RedirectMatch 403 labels\.rdf
    RedirectMatch 403 /playing.php
    RedirectMatch 403 muieblackcat
    </ifModule>
    # 5G:[BAD IPS]
    <limit GET POST PUT>
    Order Allow,Deny
    Allow from all
    # uncomment/edit/repeat next line to block IPs
    # Deny from 123.456.789
    </limit>

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.