Support » Fixing WordPress » Help? WordPress not letting me use word ‘makeup’ as a category slug for URLs.

  • TOPIC: The word ‘makeup’ has become an invalid category slug

    Hello. This is regarding my wife’s makeup blog. I was running WP 2.1 until last Friday when I upgraded to 2.5 to fix an issue I was having with all of the posts of a specific category (the makeup category), but the upgrade (while it went well) didn’t alter the bizarre behavior.

    Suddenly, about a week ago, all of the posts in which the first category (the one whose category slug WP uses in the URL at /%category%/) had been the word ‘makeup’ started returning Page Not Found errors… but if I went up to the browser address bar and alter the URL to anything other than the specific category slug word, it then found and displayed the post correctly. It’s as if WordPress was saying that ‘makeup’ was no longer a valid category slug, even though it had worked perfectly for more than a year.

    This affected 83 of my posts, breaking all of the links to them on Google. I’ve tried renaming the category, then naming it back to the now forbidden word makeup — no luck. Also tried the same with the category slug itself to no avail.

    What it boils down to is a certain word, in this case makeup just no longer seems to be valid as a category slug name. It’s still valid as the category name but not as the slug name, which is the word used to build the URL.

    I’d like to ask if anyone here has any ideas what might have caused this. I’ve logged into the CPanel on my host (godaddy) and tried manually retyping the category and slug in the category table, but that didn’t change the behavior. Also tried repairing and optimizing the table, but no change in the behavior either. None of my categories, user names, category slugs or posts are named the single word ‘makeup’ so as far as I can tell it is not a duplicate content issue.

    When I rename the category, the newly created (changed) URL works correctly, but when I rename it back to the forbidden word (makeup), I get a Page Not Found error again.

    This URL is valid…

    But this URL (which had worked up until about a week ago) isn’t…

    And, perhaps because of the way mod_rewrite rewrites URLs, this URL (or any URL in which the /%category%/ section includes something other than ‘makeup’ or ‘category’) is valid…

    Thanks for any and all input.

    UPDATE: I put into place an unpleasant workaround using the .htaccess file and a permanent redirect to point all incoming links destined for /makeup/post-title to /cosmetics/post-title… since it doesn’t matter to wordpress what word gets used in the URL for the category (%category%) spot, just as long as (in this bizarre case) it isn’t the word makeup.

    As far as SEO is concerned, the word ‘makeup’ is preferable to the word ‘cosmetics’ so I would love to be able to figure this out. I’ve been asking for help from the community for a full week and have yet to receive any input, so I’m putting this call out there again in the hopes that someone tries to help. Thanks very much in advance.

    I would still GREATLY appreciate any help unraveling this mystery.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Hi bs1 – I feel badly that no one seems able to help solve this one, and not sure I can either, except that I think there’s an important clue in the 3rd URL that you say works, with the space in it (displayed in url’s as %20).

    It seems that since it works with a space, but not without, that there is definitely a problem with slug confusion that I can’t help but think indicates a duplication, even though you say you’ve gone in thru phpMyAdmin (or an interface like it) and retyping the category and slug.

    Here’s what I would suggest (and I know this is going to be a pain in the butt for you since it is a live site and you do have 83 posts, but since makeup is your preferred keyword it may be worth it)….

    I’d try deleting the category altogether and temporarily reassign all those posts to cosmetics (they may already be?).

    Then go into phpMyAdmin to your table and make SURE it was deleted (I have seen several instances since upgrading to 2.5 of categories NOT getting deleted out of the db)…….be sure to check all tables where it might appear as a category ID (there are a couple of them now with 2.5) to be sure it’s completely removed.

    Then you should be able to change the Cosmetics category and slug to Makeup / makeup, OR you could add it again cleanly and change those posts back to the makeup category…..

    Remember it will be hard to test with your mod_rewrite rule in place, so you may have to remove that for a bit……

    I am keeping my fingers crossed for you….

    Hi TrishaM,

    Thanks so much for the reply. You’re the first person to offer any suggestions so far.

    I did something very similar to what you’ve described, creating a new temporary category (and then making it the default WP category for a couple moments), deleting the makeup category, and then recreating the makeup category and moving the posts back into it. It didn’t work, but what I neglected to do at the time was go through phpMyAdmin after deleting the makeup category to look for traces of it in the db.

    This weekend I’ll give it another try, making sure to go through the phpMyAdmin after deleting the makeup category and before adding it back. Unfortunately, it takes quite a long while to do with 84 posts because even though WP will re-assign post categories to the default category, whatever it is, it only does so when a post has a single category assigned to it. In every instance on my wife’s blog, her posts have multiple categories.

    Thanks again for the suggestion. I’ll let you know how it goes.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Help? WordPress not letting me use word ‘makeup’ as a category slug for URLs.’ is closed to new replies.