• Preface:

    • My site has about 400 Posts (Custom Post Type “dir_listing”)
    • Two custom hierarchical taxonomies (“listing_categories” and “listing_regions”) are available to associate with the above Post type
    • I currently have 203 “listing_category” Terms, and 154 “listing_region” Terms

    What’s happening:

    1. When adding/editing a “dir_listing” Post in WordPress, I checkmark 3 Parent-Level “listing_categories” Terms…
    2. … and I also checkmark 1-3 Child-Terms for each Parent Term
    3. After I click “Publish”, WordPress shows the correct Parent Terms and Child-Terms checkmarked.
    4. If I run a MySQL query on the ‘term_relationships’ table to see which term_taxonomy_ids are associated with the aforementioned Post ID, several of the Child-Term IDs are incremented by 1.
      For example, if I set the Post to be associated with Child-Term IDs 385 and 397, the term_relationships table shows the Post associated with 386 & 398.

    Things I have checked:

    • The WordPress trac, forums and Google
    • Inspecting each “listing_category” taxonomy checkbox’s HTML (i.e. I have confirmed that the name and value of each DOES correctly correspond with the desired Term ID)

    Happenings which may have affected this?

    • A number of the “listing_category” terms have been shuffled around. (e.g. A Parent term has become a Child term, or vice-versa, or a Child term has been moved to another Parent.)
    • Both Parent & Child Terms have been renamed without making any changes to the “dir_listing” Post types.
    • A number of Parent Terms and Child Terms may have been deleted by another Admin-level user.

    This also seems to happen with Child-Terms of the “listing_regions” taxonomy.

    I am at my wits’ end trying to understand why this is happening & resolve it, so anyone who takes the time to reply with thoughts/insights/suggestions/questions/gripes, you have my sincere thanks in advance! (And will likely receive incessant “Thank You”s afterward too.)

    edit: This thread was renamed from “Taxonomy gets Child-Term relations wrong in DB [Bug?]” since (I think) I came up with a better title for it. Sorry for any confusion.

Viewing 1 replies (of 1 total)
  • Hi, I think I’m finding exactly the same issue.

    This error only occurs front end for example here: ‘taxonomy-custom_category.php’
    The first taxonomy categories I added all work fine, each lists the posts allocated to it. Those original taxonomy categories had ID’s ranging from 4 > 12.
    I only get the error with taxonomy categories added later with ID’s 41 & 42. Taxonomy with ID 41 shows ID 42’s posts, and ID 42 shows none.

    In the back-end admin area everything looks normal, custom post types can be added successfully to all custom taxonomy categories.

    Was there any resolution to this?

Viewing 1 replies (of 1 total)
  • The topic ‘Custom Post Type gets wrong Custom Taxonomy Term IDs [Bug?]’ is closed to new replies.