WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Permalinks break every few times I post or edit (17 posts)

  1. jeremyduffy
    Member
    Posted 6 years ago #

    I'm using pretty permalinks and it worked fine until recently. After I upgraded to 2.2, I've noticed that every three or four times I edit pages, the links suddenly break and it goes to my 404 page.

    The thing is, I coded my 404 page to automatically look for the "right" page by looking up the permalink. The link it shows is the page I'm on so the backend still understands that this is the correct page, but it still won't show it.

    To fix it, I have to change the permalinks to one of the default options (save it), then change it back to /%postname%/ and save it again.

    This works, but is very annoying. What is going on and how do I stop it?

  2. jeremyduffy
    Member
    Posted 6 years ago #

    Additional details. This still happens every few times I edit a page (doesn't matter which page). Also, I don't need to change the permalink structure to fix it, just save it again.

    It's still very annoying and I still don't have any help :(

  3. Chris_K
    Member
    Posted 6 years ago #

    When things are working correctly, have a look at your .htaccess file (heck, make a copy of it to save it).

    Now, next time things aren't working, check that file. Any changes?

    Another thing you might do is next time things are working properly, change permissions on .htaccess so it is read-only only.

    More on chmod at Changing_File_Permissions in the codex.

  4. jeremyduffy
    Member
    Posted 6 years ago #

    Good thinking x2 Solo. I will do so. I'll have to wait until I get home to do it tho :(

  5. jeremyduffy
    Member
    Posted 6 years ago #

    I changed the permissions on the file and checked it before an after the weirdness, but nothing. It doesn't seem to be related to the .htaccess file at all. Besides, my 404 page looks up the page you're trying to find based on it's postname and it returns the correct link (which only points back to itself). It still goes to the 404 page even though it seems that wordpress knows that the actual page is supposed to be there.

  6. jeremyduffy
    Member
    Posted 6 years ago #

    From what I can tell, something about setting the permalinks fixes this weird problem, but it can't be the file itself because even with the file set to read only, it still breaks.

  7. Chris_K
    Member
    Posted 6 years ago #

    I'm so stumped I don't even have a silly suggestion to offer up. :-\

    Hopefully someone brighter will wander by.

  8. jeremyduffy
    Member
    Posted 6 years ago #

    New information: I haven't yet found a pattern in which pages cause the problem and which don't, but I found out that the permalinks file isn't the only way to fix the problem. If I change the parent of a page, that both breaks and then fixes the problem. If I edit the file and it breaks, I can edit it again to fix it (or any other page for that matter).

    Blog categories and posts always work (never break) and have no affect on the pages (i.e., editing a post doesn't fix the pages, but editing the pages does).

    I also downloaded my entire WP-admin folder and root folder and compared files before and after page breaks and the files are identical. It must be a db thing.

  9. jeremyduffy
    Member
    Posted 6 years ago #

    I upgraded to 2.2.1 and it seems to be working alright now.

  10. TravisSeitler
    Member
    Posted 6 years ago #

    When I edit a Page and save the changes, the 404 error appears. When I edit again (the same Page or another one) and save, the error goes away and I can view the page again.

    So I just jumped into PHPMyAdmin... man, this is weird.

    First off, rewrite_rules changes its option_id on me--it alternates between 215 and 217. (Correction: the option_id advances by two each time--it's now 219.) Second, here's the cause of the 404: instead of the permalink pointing to the proper permalink URL (in this case ending with /help-spread-the-word) it has /love-you appended to it (ie., help-spread-the-word/love-you.

    This actually seems malicious.

  11. yearginsm
    Member
    Posted 6 years ago #

    I too am having trouble with this. I on ocassion will get an e-mail from a visitor telling me my site is broken, even though I haven't changed anything about my permalinks, and it worked fine immediately after posting. I'm on TextDrive and running the recent 2.2.3 upgrade via the subversion branch.

  12. Grimlok
    Member
    Posted 6 years ago #

    I think it's better to bump this back up instead of creating a new topic on the same matter.

    I'm on 2.2.1 and the exact same thing happens to me. Whenever I choose some permalink format other than the default, any page creation, edit OR deletion breaks ALL of the pages. But like the topic creator said, the posts are fine.

    Anybody got an idea as to why this is?

    As a reference, I'm not using K2 now. But back then when I was using it, I could create, edit and delete pages no problem.

  13. cynthiablue
    Member
    Posted 6 years ago #

    I just upgraded to 2.3.1 and suddenly am having this same problem. It is very frustrating.

  14. tomkinsg
    Member
    Posted 6 years ago #

    I am also getting this problem on my site - i have multiple contributors so it is a little hard for me to pinpoint the exact cause but this is a little frustrating. I am on the latest release - 2.3.2.

  15. tomkinsg
    Member
    Posted 6 years ago #

    I was thinking on this today and that this is perhaps caused by a plug in. These are the plug ins that i have activated

    Akismet 2.1.3
    Easy Tube 0.2.2
    Front Page Excluded Categories 1.1.1
    Gravatar 1.1
    Group Restriction 1.0
    runPHP 2.3.1
    Sort Categories By Title 1.0
    Upcoming Events 0.5
    WP-Cron-Mail 1.2
    WPG2 3.0.2

    Any in common with those others that are experiencing on this.

  16. lvckyluke
    Member
    Posted 6 years ago #

    This problem happens to me after upgrading to 2.3.2
    Temporary workaround that i use is as described by jeremyduffy which is manually reset permalinks to default and set again all over again after writting a post. Other method is saving backup my sql wp_options and drop the tables when the problem occurs then import the backup again.
    Annoying huh..

    It must be a bug in wordpress.. :(

  17. tomkinsg
    Member
    Posted 6 years ago #

    I figured out my issue and it was a pure user error.

    I was running multiple sites out of the one installation - it works pretty well but if the .htaccess file is updated from one blog, it has the opportunity to mess up your others.

    I could have set all up the same and taken away the write access to .htaccess but i tried a different approach instead and am quite liking the results.

    I've split my different sites up to use several different installations. Er - not rocket science! Sure the overhead is a little higher on maintenance but actually i am finding it better to be separated because when i upgrade i ont put all my sites at risk. I can upgrade the less important first, test the upgrade process and do each of my important sites in turn. Much more controlled. I can do this because I have SSH access to my ISP server and I'm getting more linux savvy as each week passes. Now I have written a couple of cgi scripts that I can use to deploy themes and plugins to all sites from one master copy and also to keep my master wp-config.php file in sync across the site. I just have an extra step each time i upload a plugin or theme - no big deal really.

    I just upgraded 10 sites to WP 2.3.3 and really it was a breeze.

Topic Closed

This topic has been closed to new replies.

About this Topic