[wp-trac] [WordPress Trac] #26627: Regression: get_queried_object no longer working with pre_get_posts and pretty permalinks

WordPress Trac noreply at wordpress.org
Sat Dec 14 20:17:35 UTC 2013


#26627: Regression: get_queried_object no longer working with pre_get_posts and
pretty permalinks
-------------------------------------+------------------
 Reporter:  Otto42                   |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  3.9
Component:  Query                    |     Version:  3.8
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |
-------------------------------------+------------------
Changes (by wonderboymusic):

 * milestone:  Awaiting Review => 3.9


Comment:

 [attachment:26627.2.diff 26627.2.diff] is a different take and expands on
 my original unit tests  - in most cases involving `tax_query`, the state
 of query vars is different during `pre_get_posts` then it is after query
 has run.

 For instance, `get_query_var( 'taxonomy' )` and `get_query_var( 'term_id'
 )` contain values, but `$query->get( 'taxonomy' )` and `$query->get(
 'term_id' )` in `pre_get_posts` do not

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


More information about the wp-trac mailing list