[wp-trac] [WordPress Trac] #17661: Appending date & author based query vars to a permalink overrides the permalink

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 9 20:14:27 UTC 2012


#17661: Appending date & author based query vars to a permalink overrides the
permalink
-------------------------------------+-----------------------------
 Reporter:  dd32                     |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  Future Release
Component:  Canonical                |     Version:  3.1
 Severity:  normal                   |  Resolution:
 Keywords:  needs-testing has-patch  |
-------------------------------------+-----------------------------
Changes (by wonderboymusic):

 * keywords:  needs-patch => needs-testing has-patch


Comment:

 This is probably happening in a million other combinations as well -
 here's the problem:

 1) the flags for {{{is_*}}} are misleading because they are set to true
 for every present query var, regardless of rewrite structure

 2) the redirection happens because {{{redirect_canonical()}}} says "I'm a
 year! and the year is in the query string when I want pretty permalinks,
 redirect me!" - it doesn't, however, check if the year is also the matched
 query or not.

 3) /2012/?year=2012 and /?year=2012 should be redirected to /2012/,
 /{NOT_YEAR}/?year=2012 should not

 My patch fixes this for this ticket's use cases - I'm sure there are other
 cases which could be addressed.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17661#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list