[wp-trac] [WordPress Trac] #13535: get_query_var() not working as expected.

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 8 13:23:26 UTC 2010


#13535: get_query_var() not working as expected.
--------------------------------------+-------------------------------------
 Reporter:  pmdci                     |        Owner:  ryan    
     Type:  defect (bug)              |       Status:  reopened
 Priority:  normal                    |    Milestone:  3.0     
Component:  Query                     |      Version:  3.0     
 Severity:  major                     |   Resolution:          
 Keywords:  post_types get_query_var  |  
--------------------------------------+-------------------------------------

Comment(by filosofo):

 Trying to return inferred query values will be a mess because the current
 query logic is ad hoc. Its syntax only superficially resembles first-order
 logic; you cannot actually build logically consistent queries in general.

 Furthermore, some queries' tacit arguments are ambiguous.  For example, if
 I query `p=123`, do I really want just something that's of post type
 "post" and has ID 123?  Maybe I want any post type with ID 123.  Or maybe
 I want anything except revisions or drafts.

 Currently, if object 123 has post_type of "page," `p=123` will return
 nothing, but `p=123&post_type=page` will return it.  And that's a trivial
 example.  Go ahead and try to build inferred query values from behavior
 like that for more general situations. :)

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


More information about the wp-trac mailing list