[wp-trac] [WordPress Trac] #15256: ?cat=## permalinks do not redirect when category is a parent
WordPress Trac
wp-trac at lists.automattic.com
Tue Aug 30 05:26:07 UTC 2011
#15256: ?cat=## permalinks do not redirect when category is a parent
-------------------------------------+-----------------------
Reporter: froman118 | Owner:
Type: defect (bug) | Status: reopened
Priority: high | Milestone: 3.3
Component: Canonical | Version: 3.0.1
Severity: normal | Resolution:
Keywords: has-patch needs-testing |
-------------------------------------+-----------------------
Comment (by dd32):
> Or is there a better way to fix this?
I've been thinking about it a bit, and in testing, it's hit me that only
categories (not custom taxonomies, etc) include children in the Tax Query
array, which is where the issue is originating from.
Upon looking into `WP_Tax_Query` I've found that children are, by default,
included - rendering query.php loading them being redundant. The
[attachment:15256.diff attached patch] removes category children from the
array, allowing `WP_Tax_Query` to fall back to it's default of loading the
children itself. Logically, this results in no logic change to the Query
process, but does however, fix the Canonicalism process (as now WP_Query
now states that a single category was requested - which is true)).
However, [attachment:15256.patch] is also viable. I'd like someone elses
opinion on it before going ahead with either though.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/15256#comment:9>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list