#17054 closed defect (bug) (fixed)
Multiple tag queries broken
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1.2 |
| Component: | Taxonomy | Version: | 3.1.1 |
| Severity: | normal | Keywords: | has-patch commit |
| Cc: |
Description
Hi,
Since the update to 3.1.1 archive pages like /tag/tag1+tag2/ result in a 404. Could anybody verify this?
Tested with 3.1.1 and latest trunk w/ TwentyTen
Cheers,
Berny
Attachments (3)
Change History (20)
Due to #16730, 3.1 would sometimes do an OR when it should have been doing an AND for these requests. tag1+tag2 is an intersection and tag1,tag2 is a union. Is an intersection (AND) what you are expecting from tag1+tag2?
3.1.1 doesn't set a queried object for tag1+tag2. 3.0 sets the queried object to tag1.
3.1.1 doesn't set a queried object for tag1+tag2. 3.0 sets the queried object to tag1.
To clarify, 3.1 also did this.
Sorry, it took me a little bit as I was *unknowingly* using a child theme of TwentyTen which pretty much looked the same, except the index.php has been modified. And as far as I can tell, that's where my 404 came from:
Queries to /tag/tag1/ would be handled by the tag.php template while /tag/tag1+tag2/ (logical AND) would be redirected to index.php.
Anyway, Ryan's patch looks good to me on my machine. - Gonna test it on another system.
- Keywords close added; reporter-feedback removed
yep, works as well.
thanks for the quick fix!
- Keywords close removed
The close keyword is for recommending the resolution of a ticket, other than fixed (wontfix, invalid, etc.).
comment:10
neoxx — 2 years ago
sorry. - still trying to keep with the latest changes to the trac workflows...
comment:11
ryan — 2 years ago
NOT requests seem unaffected. Neither 3.0 nor 3.1.1 set queried object or is_* flag for pure NOT/NOT IN requests.
comment:12
ryan — 2 years ago
- Resolution set to fixed
- Status changed from new to closed
comment:13
ryan — 2 years ago
comment:14
scribu — 2 years ago
There is no 'NOT' operator for taxonomy queries. The only accepted ones are 'AND', 'IN' and 'NOT IN'.
comment:15
scribu — 2 years ago
- Keywords has-patch commit added
- Resolution fixed deleted
- Status changed from closed to reopened
We really shouldn't leave this in. See 17054.2.diff.
I also wrote some unit tests for query flags, which would catch this bug if it sneaked up again. 50 tests so far.
comment:16
ryan — 2 years ago
- Resolution set to fixed
- Status changed from reopened to closed

We can't reproduce it. Have you tried deactivating all plugins?