﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
16627,Rewrite query vars are stripped from custom taxonomy page URLs via redirect_canonical(),gnoodl,,"In wp-includes/canonical.php, version 3.1 changed lines 155-177 from

{{{
if ( $term_count <= 1 && !empty($obj->term_id) && ( $tax_url = get_term_link((int)$obj->term_id, $obj->taxonomy) )
		&& !is_wp_error($tax_url) && $redirect['query'] ) {

    /* Not important */
    
	$tax_url = parse_url($tax_url);
	if ( ! empty($tax_url['query']) ) { // Custom taxonomies may only be accessable via ?taxonomy=..&term=..
		parse_str($tax_url['query'], $query_vars);
		$redirect['query'] = add_query_arg($query_vars, $redirect['query']);
	} else { // Taxonomy is accessable via a ""pretty-URL""
		$redirect['path'] = $tax_url['path'];
	}
}
}}}

to (lines 153-174)

{{{
if ( $term_count <= 1 && !empty($obj->term_id) && ( $tax_url = get_term_link((int)$obj->term_id, $obj->taxonomy) ) && !is_wp_error($tax_url) ) {
	if ( !empty($redirect['query']) ) {

        /* Not important */
	    
	}
	$tax_url = parse_url($tax_url);
	if ( ! empty($tax_url['query']) ) { // Custom taxonomies may only be accessable via ?taxonomy=..&term=..
		parse_str($tax_url['query'], $query_vars);
		$redirect['query'] = add_query_arg($query_vars, $redirect['query']);
	} else { // Taxonomy is accessable via a ""pretty-URL""
		$redirect['path'] = $tax_url['path'];
	}
}
}}}

The difference here is that in the new version, the `$redirect['path']` is '''always''' set to the taxonomy path, eliminating any query vars added via custom rewrite rule, regardless of whether there are query vars in `$redirect['query']` or not.",defect (bug),closed,normal,3.1.1,Canonical,3.1,normal,fixed,,eric@… mikeschinkel@…
