WordPress.org

Make WordPress Core

Opened 4 years ago

Closed 4 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:

Description

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:

http://core.trac.wordpress.org/changeset/13170/trunk

Change History (8)

comment:1 follow-up: scribu4 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 scribu4 years ago

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

comment:3 scribu4 years ago

Also see [13480].

comment:4 in reply to: ↑ 1 wahgnube4 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 scribu4 years ago

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

comment:6 dd324 years ago

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

comment:7 wahgnube4 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 automattor4 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.