[wp-trac] [WordPress Trac] #18734: Subcategory archive does work with any name as parent category in URL

WordPress Trac wp-trac at lists.automattic.com
Wed Sep 21 22:41:25 UTC 2011


#18734: Subcategory archive does work with any name as parent category in URL
-------------------------------------------+------------------------------
 Reporter:  ocean90                        |       Owner:
     Type:  defect (bug)                   |      Status:  new
 Priority:  normal                         |   Milestone:  Awaiting Review
Component:  Canonical                      |     Version:  3.0.1
 Severity:  normal                         |  Resolution:
 Keywords:  dev-feedback needs-unit-tests  |
-------------------------------------------+------------------------------
Changes (by duck_):

 * version:  3.1 => 3.0.1


Comment:

 Some more canonical tests: [UT444]

 '''History in trunk'''

 [13091] for original /category/child/ to /category/parent/child/
 redirection.

 Broken by [15462] as "The easiest one is to assume that if we had come to
 the right category page without any get variables, we don't need the logic
 for redirecting to the canonical category page. This is valid statement,
 because that logic relies only on removing get arguments." (#14201) is
 incorrect. `parse_url($tax_url) ... $redirect['path'] = $tax_url['path'];`
 is redirecting to the correct term link.

 Fixed again in [15705], but re-introducing #14201. The scope of the
 `!empty($redirect['query']` conditional was changed.

 Re-broken by [18079] which moved stuff back inside
 `!empty($redirect['query']` (also fixing #14201 again).

 tl;dr: canonical isn't kicking in unless the URL has a query. This was
 done as a stop-gap fix for #14201.

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


More information about the wp-trac mailing list