WordPress.org

Ready to get started?Download WordPress

Forums

404 after save or publish a post (80 posts)

  1. rdsmes
    Member
    Posted 8 years ago #

    vkaryl -

    Thanks for the pointer. It looks like a ticket is already open on this subject - #2498, "faulty "referredby" in write post page" - and a patch has been suggested in the same area of code where I placed mine.

    Since it's already in the bug tracking mechanism, but there is no official resolution or fix for the problem, I'm not sure what options users have at this point other than to try a patch of some sort.

  2. vkaryl
    Member
    Posted 8 years ago #

    Me either. Stuff like this is never anything I have problems with so I never know what to advise if anything.... you might at this point post to the testers list (in self-defense, you know!)

  3. rdsmes
    Member
    Posted 8 years ago #

    Well, just in case folks want to give it a try, the suggested patch in the bug tracking is this:

    in wp-includes\functions.php, function update_post_caches (~line 1400 or so), find:
    if ( !$posts )
    return;

    and change to:

    if ( !$posts || !$posts[0]->ID )
    return;

    This seems to work, and serves the same purpose as my patch did.

  4. vkaryl
    Member
    Posted 8 years ago #

    If you're going to try that yourself, how about posting back how it goes?

  5. rdsmes
    Member
    Posted 8 years ago #

    Oops sorry, I did and added that fact to my previous post. Looks like it works fine, at least in my case. I would hope that a few more folks give it a try and see if it helps them.

    I guess it would be nice if the support forums had a bit more insight into what was going on behind the scenes of the bug reports, but that's a mighty task. Although it looks like this patch had just been suggested very recently, so the submitter was looking at the problem at the same time we were discussing it here.

  6. abrazell
    Member
    Posted 8 years ago #

    Yeah I'd like to know since it was my patch I just submitted a bit ago. :-)

    http://www.technosailor.com/wordpress-201-posting-bug/

  7. vkaryl
    Member
    Posted 8 years ago #

    rdsmes - the situation here is that most of us who do "support" have a good understanding of overall stuff. Some folks will have some specialized knowledge, but whether they're around here often enough to offer help is a crapshoot.

    Volunteerism in action....

  8. rdsmes
    Member
    Posted 8 years ago #

    I understand. A lot of hands all working toward the same end - at the same time! We all get there eventually. As for me, I'd never even looked through the bug reports before - maybe I'll start there next time.

    Kudos to Abrazell/Technosailor for the post on his blog and the patch. But we could have used your brain here on this thread over the past couple of days. And that might have saved me the trouble of digging through the code. I could have just let you do it... :)

    At least we both ended up in the same area as the cause of the problem. Whew!

  9. mynetweblogs
    Member
    Posted 8 years ago #

    I never had this problem. The only issue I have had is the pingomatic link making the post take decades to resolve. So either its timing out earlier on some of you guys, or its something else. Its important to note that not everyone is getting the same errors.

  10. jeffparsons
    Member
    Posted 8 years ago #

    Well I had high hopes and expectations, but alas. :-)

    I tried both correction suggestions on the production server and I still get the 404 when trying to publish/save/saveandcontinue on a post with more than approx 1000 chars.

    Trim the excess to under 1000 (approx) chars and the post will save.

    *Problem server
    Apache 1.3.34
    PHP 4.4.1
    MySQL 4.0.25

    *Different server that doesn't show the problem
    Apache 1.3.33
    PHP 4.4.0
    MySQL 4.0.25

    *localhost that doesn't show the problem
    Apache 2.0.55
    PHP 5.1.2
    MySQL 4.1.12

  11. rdsmes
    Member
    Posted 8 years ago #

    jeffparsons -

    What's the URL in the browser on the 404?

  12. jeffparsons
    Member
    Posted 8 years ago #

    Prior to clicking the save button the URL is:

    http://jeffparsons.ca/wp-admin/post.php?action=edit&post=7

    and after clicking the Save button the URL is:

    http://jeffparsons.ca/wp-admin/post.php

  13. rdsmes
    Member
    Posted 8 years ago #

    That looks like it should be a perfectly legit address for the 'write post' page for your site, doesn't it? Have you looked in the server error log to see if the 404 error is in there? Does the 404 error page look like it comes from your site or is it a more generic Apache error page?

  14. jeffparsons
    Member
    Posted 8 years ago #

    That's the trick with this particular error as it surely looks like a legitimate address. It is a 404 page from my theme, not the generic Apache error page. There are no 404 errors in the cPanel error log for the site.

  15. rdsmes
    Member
    Posted 8 years ago #

    That's important information, since there seems to be some confusion over WordPress-generated 404 errors, server generated 404s and browser timeouts.

    Perhaps WordPress should consider using a message that give a little more info than the 404 - Not Found to help users to distinguish the difference. They all have different causes.

  16. Rodrigo Muniz
    Member
    Posted 8 years ago #

    Here I have the same problem. But only if, before click in "publish", I to save the post.
    After click in "Publish" button I get WordPress-generated 404 error and in address bar:
    http://www.rodrigomuniz.com/blog/wp-admin/%3Cdiv%20id=%5C'error%5C'%3E

    %3Cdiv%20id=%5C'error%5C'%3E what it's?

    By the way, the post appears normaly, but the 404 is not cool.

  17. rdsmes
    Member
    Posted 8 years ago #

    rodrigomuniz-

    Read back through this thread and you'll find a full discussion of the error and a patch to try.

  18. Ryan Boren
    WordPress Dev
    Posted 8 years ago #

    This change might help. You can either apply that diff, or download a new classes.php file here. Replace your existing wp-includes/classes.php with that one.

    If you're a subversion user, that fix and some others are available from the 2.0 branch.

    Let us know if that change helps.

  19. rdsmes
    Member
    Posted 8 years ago #

    Ryan,

    Thanks for the change info. I figured that when I and Technosailor had proposed patches that they were just patches, and not necessarily the preferred fix for the problem.

    I'm running your change to the classes file on my site now, and have removed my patch to the functions file. Your change does seem to correct the problem - at least in my case, it was happening every time I used 'save and continue'.

    Hope we were able to help point you in the right direction...

  20. Ryan Boren
    WordPress Dev
    Posted 8 years ago #

    rdsmes, your debugging and testing was very helpful. Thanks.

  21. nsbucky
    Member
    Posted 8 years ago #

    Uh, yeah none of these changes work, and I still get a constant 404 error. Any idea? This has become a very frustrating problem.

  22. omz13
    Member
    Posted 8 years ago #

    I recently encountered this problem when I changed my permalink settings (away from the default /?=123 method into something more custom, i.e. /%category%/%postname%) and added rewriting rules into my lighttpd system.

    Anyhow, this is to let y'all know that the

    if ( !$posts ) to if ( !$posts || !$posts[0]->ID ) patch works for me :-)

  23. Hawke
    Member
    Posted 8 years ago #

    Just curious... are the fixes working for people who got a blank page or a 404? I'm wondering if there are two different problems at work here and perhaps the fixes are working for one set and not the other.

    I'm running into blank page issues

  24. rdsmes
    Member
    Posted 8 years ago #

    Hawke -

    I can only speak to my experience, in which I was seeing a 404 error on the redirection after using 'save and continue' and then doing a 'save' or 'publish' operation - with the URL containing the long mySQL error string. I did not see a blank page.

    In that case, yes, the fix that Ryan placed into the Trac system is working for me, as were the temporary patches. I could reliably reproduce the error, and it is now gone. It is possible that some of the other posters in this thread are seeing different problems.

  25. Hawke
    Member
    Posted 8 years ago #

    Okay, had a chance to check it... Ryan's change did not do anything for my blank page after save & continue editing problem. Will continue to try various things, will let you know if anything works! =)

  26. vkaryl
    Member
    Posted 8 years ago #

    Hawke: this would seem to be a different problem, or at least a different manifestation of the problem.

    At this point it's probably better to start a new thread, listing your specific issue in detail, rather than add not-same info into this thread.

  27. jeffparsons
    Member
    Posted 8 years ago #

    Quite right vkaryl, several issues at work here. Mine is resolved, finally, with much help from 'rdsmes' offline. A heartfelt thankyou to him.

    I was having difficulty with one post in particular, one that included the word "curl" as noted in this 403 error thread. I reverted back to WordPress 1.5.2 and started getting the 403 error instead of the 404.

    Purely coincidental that this word in my post was at around the 1000 character mark.

  28. CommunityGroups
    Member
    Posted 8 years ago #

    I'm getting 404's when I publish Pages and I've now realised what's causing it but what's the simplist way to overcome it?
    Posts are OK but Pages fail without an error message being created until the published page is viewed. The cause would seem to be that my webhosting provider does not permit use of the root except for index.html or index.php however that's exactly where WordPress attempts, and in my case fails, to publish them. Using version 2.0.

  29. stuartc1
    Member
    Posted 8 years ago #

    Im experiencing a 500 error - wordpress is spitting out an Internal Server Error when I try and post code in blog.

    I've used the fix above - but that does not help.

    Anybody got any other ideas?

  30. CommunityGroups
    Member
    Posted 8 years ago #

    I now see that my reasoning was a bit out. I have two uncorrected blogs. One does the pages correctly, e.g. '?page_id=18' but the other is putting '/page_name/' and hence failing to display.

    Any thoughts appreciated.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags