#12533 closed defect (bug) (fixed)
Parent term count
Reported by: | jfarthing84 | Owned by: | filosofo |
---|---|---|---|
Milestone: | 3.0 | Priority: | highest omg bbq |
Severity: | blocker | Version: | 3.0 |
Component: | Taxonomy | Keywords: | has-patch commit |
Focuses: | Cc: |
Description (last modified by )
Hierarchical term parents (including categories) count stays at 0 when using child terms. This results in a 404 error when trying to pull up the term/category page for a parent term which has children with posts.
When viewing a Parent term of a custom taxonomy, Objects in the children of the term are not shown.
Attachments (4)
Change History (24)
#2
@
15 years ago
Upon even further investigation, if you pull up an empty custom taxonomy (hierarchical or not), you get a 404 error rather than the default page displaying "No posts found" which would display if you pulled up an empty category.
#5
@
15 years ago
Thanks. You will also have to add the 'hide_empty=>false' flag to the is_tax section og WP_Query::get_queried_object().
Also, there still is a problem with custom hierarchical taxonomies.
#6
@
15 years ago
Thanks. You will also have to add the 'hide_empty=>false' flag to the is_tax section og WP_Query::get_queried_object().
The changeset doesnt show it very well, but thats where it is.
Hierarchical term parents (including categories) count stays at 0 when using child terms.
This depends on if the arg 'pad_counts' is set or not, By default, its not. Where are you seeing it not being reported correctly?
#7
@
15 years ago
Forget the count. I was just saying, it is not taking child terms into account at all.
Look at how categories are handled and then look at how taxonomies are handled. You'll clearly see that the taxonomy handling lacks any support for hierarchical taxonomies.
#8
@
15 years ago
- Description modified (diff)
- Keywords dev-feedback removed
Look at how categories are handled and then look at how taxonomies are handled. You'll clearly see that the taxonomy handling lacks any support for hierarchical taxonomies.
Are you saying, That visiting /tax/parent/ is not showing posts in /tax/parent/child/ too? - Sorry, I didnt quite understand that in the original ticket description.
Showing the children always confused me, but i can see why it would be required.
#9
follow-up:
↓ 10
@
15 years ago
Yea, exactly.
Say you are using something like this:
United States
- Alabama
- Alaska
- Etc...
In most cases, you will only assign a post to one of the child terms. Then, if you visit the parent term (you wanted to see all pots in the US), you should see ALL child posts.
#10
in reply to:
↑ 9
@
15 years ago
- Keywords needs-patch added
Replying to jfarthing84:
Say you are using something like this:
United States
- Alabama
- Alaska
- Etc...
In most cases, you will only assign a post to one of the child terms. Then, if you visit the parent term (you wanted to see all pots in the US), you should see ALL child posts.
Agreed.
#14
@
15 years ago
- Keywords commit added
12533.2.diff:
- bring in empty terms only for hierarchical taxonomies
- replace a count() check with !empty()
12533.3.diff:
- remove redundant whitespace
#15
@
15 years ago
Previous patches did not handle the case where $qtaxonomy? was empty.
This is fixed in 12533.4.diff
#16
@
15 years ago
This is fixed in 12533.4.diff
Patch looks good overall, I'll add it to the testing queue.
#18
@
15 years ago
It should have been "Props jfarthing84, scribu", since he submitted the initial patch. Oh well...
It seems this is just affecting hierarchical custom taxonomies (which is still just as important).