Cannot combine category and tag queries in some cases
|Reported by:||philhassey||Owned by:||ryan|
I am trying to find all posts that are in the intersection of category x and tag a. I would expect that this query to my blog would work:
/?category_name=x&tag=a : Gives a 404 -- even though I have several items in category x && tag a.
However, I have found that querying a single category with multiple tags does work:
/?category_name=x&tag=a+b : Gives results of items in category x && tag a && tag b.
As a work-a-round for my issue, I've found that this works:
/?category_name=x&tag=a+a : Gives results of items in category x && tag a
I found this work-a-round by searching through includes/query.php to see if I could troubleshoot the issue. I'm not quite sure how to fix the issue, but it appears that
tag=a uses a different query than tag=a+a ..
I hope my explanation was easy to follow, but if not, I'd be glad to try to explain further, or provide an example on my blog.
Change History (36)
- Priority changed from normal to high
- Summary changed from URL Queries /?category_name=x&tag=a don't work to Cannot combine category and tag queries in some cases
- Keywords has-patch needs-testing 2nd-opinion added
- Version changed from 2.3.1 to 2.5
comment:20 ryan — 5 years ago
- Milestone changed from 2.7 to 2.8
- Type changed from defect to enhancement
comment:30 follow-up: ↓ 31 ryan — 4 years ago
- Milestone 2.8 deleted
- Resolution set to invalid
- Status changed from new to closed
comment:31 in reply to: ↑ 30 josswinn — 4 years ago
- Milestone set to 2.8
- Resolution invalid deleted
- Status changed from closed to reopened