Support » Fixing WordPress » 404 Error after edit -> Update Post

  • Hi everyone!

    I’ve had this problem, ever since I installed 2.7 RC1.
    Whenever I edit an existing post, save some tags, make some adjustments to the post, etc. And then click “Update Post”, I get a 404 not found error.

    I get redirected, after pressing “save” and the url generated is something like this:
    http://mysite.com/wp-admin/post.php?action=edit&post=934&_wp_original_http_referer=http%3A%2F%2Fmysite.com%2Fwp-admin%2Fedit.php&message=1"

    This generates the 404. The post is there, I can view it in the list, and as a single post just fine. Any ideas as to what’s causing this?

    Thanks.

Viewing 15 replies - 1 through 15 (of 25 total)
  • I just tested to see if this was a template fault, but it seems that even with the default theme this error occurs.
    I’ve adjusted permalink structure, set it to default, but that doesn’t matter either. The 404 error persists.

    I’m going to update another blog, hope that the error won’t appear there… If it doesn’t, it still is going to be a pain to find out what is causing it. Weird because I haven’t seen any forum posts on this, so it might be just me having this error.

    No-one with the exact same problem?

    I’m going to install a test wordpress (development server) to see if it’s related to my site.

    I don’t get the 404 error, though I’m redirected to white pages. It’s a pity. This problem and the feed problem make it a bit painful.

    I’ve just tested this on a clean install of 2.7, and after pressing “Update Post” I get redirected to the edit page. So, the problem might be related to updated install’s of wordpress…

    I’ll be upgrading some other blogs this week, going to see if they have the same problem. If so, I might try a clean install, and importing everything into that install.

    same exact thing is happening to me, i had installed RC2 and it has happened ever since.

    Same here… It’s been doing that for a long while now. Quite irritating.

    <i>Quick edit</i> works fine though.

    Okay, I found out the piece of URI produced by pressing the “update post” button, that doesn’t work, but do not yet know how to fix it.

    The URI that I get redirected to:
    http://mysite.x/wp-admin/post.php?action=edit&post=27&_wp_original_http_referer=http%3A%2F%2Fmysite.x%2Fwp-admin%2Fedit.php&message=1

    The URI that works:
    http://mysite.x/wp-admin/post.php?action=edit&post=27&_wp_original_http_referer=http%3A%2F%2Fmysite.x%2Fwp-admin%2Fedit.php

    But it doesn’t show the “Post updated. Continue editing below or “go back” message, which I figure is added by the &message=1 …

    Going to digg into this.

    Cheers man, keep us posted!

    Ok, weird thing. I’ve posted a “happy new year” blog post.
    I can update that post fine, it returns to the edit screen, with the message “post updated”.

    But, a post about christmas presents, still gives me the 404 after updating… 😀

    Navigating away from the admin panel, and moving back in, editing the same “happy new year” post, again gives me that 404 error.

    In the case of error 404, it redirects to message=1, but earlier it was redirecting to message=6…

    I’m at a loss here…

    This looks similar…

    It doesn’t have anything to do with activated plug-in’s either, eventhough the avatar plug-in suffers from this issue.

    I’ve got the same problem on two instances of WordPress, although they’re exhibiting different behavior. On my personal site, I only get “Error 500” right after I publish a post and when I try to delete a post. On an organizational site, I get “Error 500” on every URL including /wp-admin/. That problem occurred when I tried to reactivate the plugins after a manual upgrade.

    Okay, I’ve found a fix, but I’m no server expert, so I don’t know if I just created a security issue, but here goes.

    I’ve been having this problem for a while now, and I am convinced that it’s a server configuration issue. This is because on my home server and several other WordPress installation, this error does not occur. It’s strange however, that this problem only arises after installing WP 2.7.

    There are a few changes I made to the .htaccess file, in order to find a solution by using a “trial and error” method. (Thanks Hanewurger, your post helped me out A LOT!)

    Here’s what I added to the .htaccess file:

    # BEGIN 404 Fix
    
    <IfModule mod_env.c>
    SetEnv MODSEC_ENABLE Off
    PassEnv MODSEC_ENABLE
    </IfModule>
    
    #END 404 Fix

    The original (WordPress generated) .htaccess looked like this:

    # BEGIN WordPress
    
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress

    So, after my edit, the .htaccess looks like this:

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    
    # END WordPress
    
    # BEGIN 404 Fix
    
    <IfModule mod_env.c>
    SetEnv MODSEC_ENABLE Off
    PassEnv MODSEC_ENABLE
    </IfModule>
    
    #END 404 Fix

    The 404 errors after updating posts are now solved. However, I’m not an expert, but why does this happen, and why do I have to make this adjustment? I wonder if this causes any security problems on my domain… Is there anyone who can shed some light on this issue?

    @Hanewurger, maybe you can try this solution and see if that Avatar Plug-in issue is solved as well?

    @danielbachhuber, in the link that Hanewurger provided is some information on other possible solutions. You might want to try them out, because the post was really there to help solve “Error 500” issues.

    Hope anyone is helped by this, and I hope someone can shed some light on the security questions 😉

    Regards,
    Jo0Lz.

    Unfortunately the .htaccess modifications didn’t work for me, same goes for the avatar-plugin.

    From what I heard, modifying the .htaccess file can solve a lot of issues, but it’s advised to leave this file as it is. It did solve some of the WP-issues I had before 2.7, but it seems like the bugs got resistant now 🙂

    I’m sure your method will help a lot of users struggling with this issue, but as you mentionned: answers from WP-experts might give a fully waterproof solution.

    Eitherway, thanks for the time and energy you’ve put in this fix – I think it will help most of the people out who are landing on this page.

    Editing a comment works fine, unlike the post.

Viewing 15 replies - 1 through 15 (of 25 total)
  • The topic ‘404 Error after edit -> Update Post’ is closed to new replies.