#15171 closed defect (bug) (worksforme)
Query for category returns pages too (since r15650)
Reported by: | demetris | Owned by: | scribu |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.1 |
Component: | Query | Keywords: | close |
Focuses: | Cc: |
Description
I have a category with slug misc.
I also have a Page with slug misc.
Since r15650 queries for the category misc also return the Page with slug misc as well as all descendants of this Page.
If you need any more info, please let me know.
Change History (5)
#3
@
14 years ago
- Keywords close added
- Resolution set to worksforme
- Status changed from accepted to closed
#5
@
14 years ago
OK. Here are some more details:
First, I forgot to mention that the category with the slug misc is also the default category in the site that had the issue.
Now, following scribu’s suggestion on the dev channel, I registered the taxonomy category for pages, to see if any of the pages had the category misc assigned to them.
(This took me more that it should, because I thought the fuction was register_taxonomy_for_post_type
. But it is for object type.)
Adding cats to pages showed that some of the pages were in the category misc, while others were in no category at all.
For instance, this page was in the category misc:
http://op111.net/misc/wp-29-props
While this had no category at all:
http://op111.net/misc/wp-30-props
A quick look did not reveal any pattern explaining the difference. Nothing that I could see.
So, I simply unticked misc for the pages that had it, removed the taxonomy registration, and everything is back to normal.
After talking on IRC, neither me nor even demetris himself was able to reproduce the problem.