[wp-trac] [WordPress Trac] #15433: Don't use 'name' query var if 'p' is already set

WordPress Trac wp-trac at lists.automattic.com
Mon Nov 15 14:13:58 UTC 2010


#15433: Don't use 'name' query var if 'p' is already set
--------------------------+-------------------------------------------------
 Reporter:  scribu        |        Owner:          
     Type:  defect (bug)  |       Status:  reopened
 Priority:  normal        |    Milestone:  3.1     
Component:  Query         |      Version:          
 Severity:  normal        |   Resolution:          
 Keywords:                |  
--------------------------+-------------------------------------------------
Changes (by filosofo):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 This seems inconsistent with other current behavior and is somewhat
 arbitrary.

 First, queries typically return results in which all the arguments are all
 true, except in the case in which they're ''logically'' impossible.  If
 you request the posts with category X and tag Y, and there are no posts
 that have category X ''and'' tag Y, you don't get any results.  It seems
 reasonable that the same would apply for the 'name' and 'p' arguments.

 Second, what is the situation in which someone would query both by ID and
 name?  It seems too obscure to warrant such an unexpected, illogical
 exception.

 Third, it's not immediately obvious why we should favor ID over name.  In
 fact, most sites with "pretty" permalinks on do the majority of their
 single-result queries by post_name, and the general trend in WP seems to
 be away from using IDs as identifiers to using slugs.

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


More information about the wp-trac mailing list