The MU forums have moved to WordPress.org

Adding Tags to Posts is Changing Category IDs - Seriously (1 post)

  1. awarner20
    Member
    Posted 13 years ago #

    I've been troubleshooting this issue for a few hours and it's driving me batty. It has been discovered that several of the categories on this install have had their IDs change, at least that's what it looks like from the start.

    We had a category named "A Lasting Love" with an ID of 38 created several months ago. I know this was definitely an ID of 38 because I am using the catlist plugin to pull in posts of a certain category into a page using shortcode like this:
    [catlist id=38 numberposts=-1 content=yes]

    It was noticed that the category posts were no longer displaying on this page and after some investigation, it turns out that the category ID has changed to 1044. Or maybe more appropriately, all the posts were now associated with a category ID of 1044. When looking at the categories list in the backend and hovering, you see the cat=1044. On a related note: Because these posts contain audio podcasts, we had submitted the category feed to iTunes and now the feed is broken and when validating the feed through http://feedvalidator.org, a Server returned HTTP Error 404: Not Found is returned.

    Ok, back to the investigation. I went to the wp_sitecategories table and searched for a category named "Lasting Love"

    SELECT *
    FROM <code>wp_sitecategories</code>
    WHERE <code>cat_name</code> LIKE '%lasting love%'
    LIMIT 0 , 30

    ...which returned http://tinypic.com/r/2219hz/5

    You can see that it has the right ID...so what's the deal???

    I also noticed that there were quite a few duplicate category names, all with different IDs. What!? So I started looking into that and discovered some references to a possible bug related to tags and categories. I then realized that the people involved with this site had recently started adding Tags to old posts and to new posts being published. I got in touch and asked if they had been adding tags that were the same as the category name and was told "yes" in many cases.

    So far I know that the cat ID for the "A Lasting Love" category was 38, but somehow it's now 1044 and that cat 1044 is the one that's being pulled into the WP backend for editing and also the one that 21 posts are associated with. However, it's also the one that's associated with the feed address, but when validating the feed, I am getting a 404. Those are the facts.

    My obvious questions:
    Why did this happen?
    What else can I check to help verify what's going on?
    How can I fix this for all categories?

    If anyone can please help shed some light on this, I would be very grateful.

    I'll post more details as I try to learn more...

About this Topic

  • Started 13 years ago by awarner20