Possible subcategories bugs

  • Say I have a category structure that looks like this:

    a
    --a1
    --a2
    b
    etc

    (a is the parent of a1 and a2)

    Unless I have a post that is actually in category a (e.g., it’s not enough to be in either a>a1, a>a2 or both) then the categories widget will not show category a or any of its subcategories.

    So to make those categories show up I have to have at least one post that is in category a proper. Say that this post is categorized as being in a and a>a1. Then if I go to

    subdomain.wp.com/tag/a

    my post will show up twice. Once for being in a and once for being in a>a1.

    It seems to me that these behaviors are contradictory. Either the categories should display on the sidebar regardless of whether there are any posts in a proper (so WP recognizes a>a1 as being part of a), or the post should only appear once when i go to /tag/a (so WP considers a and a>a1 to be exclusive).

    This makes me think that the posts are retrieved by looping through the category and then all the subcategories. If that’s the case, can it be changed so that if a given post in an appropriate subcategory is also posted to the category proper then it will be skipped the 2nd, 3rd, etc. times through?

  • Unless I have a post that is actually in category a (e.g., it’s not enough to be in either a>a1, a>a2 or both) then the categories widget will not show category a or any of its subcategories.

    I sent a feedback on this issue on 04/19 and been told that “This isn’t particularly a widget issue. It’s that no categories will display beneath a category that has no posts in it.”

    and that’s true, it’s not a widget issue indeed. certainly, the actual problem lies somewhere in the list_cats() function which is called by the widget in the sidebar.php template.

    in particular this erroneous behavior can be seen in case a ‘Show Hierarchy’ argument is passed to this function from the widget control.

    no reply to one more detailed feedback yet (04/20).

  • That’s how normal WordPress works as well. I would even suggest talking it up on the normal support forums as well.

    I always thought of it as like a box in a box situation.

  • yes, this is a core bug. we could take it off rather to the http://mu.woprdress.org/forums/ , but being a wordpress.com user I can’t see much point of it since even if someone of the wp community would ever make a patch, it still couldn’t be applied to wpcom codebase.

    while talking it up in vain on this forums, there’s a ghost of a hope it’ll be heard and fixed and may be even backported to wordpress[mu] core for the common good of the wordpress community.

    if there’s declared a nested cats possibility, normal sidebar behavior should be to list all non-empty cats with indents respective to the cat. nesting level.

    combined with so called Global Tags in the post meta-section this makes a navigation to be very hard and almost unusable for a wpcom blog visitor.

  • I came across this ‘feature’ recently too. The same thing happens on an Archives page in the Archives by Subject section, so you don’t get a link to the parent category or any of its child categories.

    To work around it: just assign a single post to the parent category. If you are going to tag a>a1 then it is reasonable that you might have at least one post that you can also tag a. Then the parent and all it’s children (that have been used at least once, of course) will display in the categories widget and on the Archive page.

    I think the work around is reasonable, it’s not as if you have to tag every post that requires a>a1 or a>a2 with a. This makes me think that a fix is not a priority.`

  • The topic ‘Possible subcategories bugs’ is closed to new replies.