Make WordPress Core

Opened 5 years ago

Closed 5 years ago

#12547 closed defect (bug) (fixed)

Union/intersection tag query URLs broken

Reported by: wahgnube Owned by: dd32
Milestone: 3.0 Priority: high
Severity: normal Version:
Component: Query Keywords: needs-patch
Focuses: Cc:


I noticed some time ago that links querying multiple tags, e.g. site.org/tag/foo,bar/ and site.org/tag/foo+bar/ , stopped working on my site which runs WordPress trunk. Both these queries rewrite to site.org/tag/foo/

After systematically stepping backward through svn changesets, I believe that the changeset that was causing this problem is the following:


Change History (8)

comment:1 follow-up: @scribu5 years ago

  • Keywords reporter-feedback added; link tag multiple union intersection removed

If you turn off pretty permalinks, do you get the correct posts?

comment:2 @scribu5 years ago

What I mean is, does ?tag=foo,bar display posts with tags foo OR bar?

comment:3 @scribu5 years ago

Also see [13480].

comment:4 in reply to: ↑ 1 @wahgnube5 years ago

Replying to scribu:

If you turn off pretty permalinks, do you get the correct posts?

This is the first thing I tried, and no, it does not work without pretty permalinks either.

comment:5 @scribu5 years ago

  • Component changed from Rewrite Rules to Query
  • Keywords needs-patch added; reporter-feedback removed

comment:6 @dd325 years ago

  • Owner changed from ryan to dd32
  • Status changed from new to accepted

comment:7 @wahgnube5 years ago

I have temporarily fixed it with the following modification on line 135 of wp-includes/canonical.php:

} elseif ( is_category() + } elseif ( is_category()
is_tag() is_tax() ) { Terms (Tags/categories)
is_tax() ) { Terms (Tags/categories)

I don't know what the implications of this change are, other than it prevents a bunch of calls to remove_query_arg()s.

comment:8 @automattor5 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [13623]) Correct logic inversion in Canonical Taxonomy Term links. Fixes #12547

Note: See TracTickets for help on using tickets.