[wp-trac] [WordPress Trac] #17551: Need a post_id query that works regardless of post_type.

WordPress Trac wp-trac at lists.automattic.com
Wed May 25 12:17:00 UTC 2011


#17551: Need a post_id query that works regardless of post_type.
-------------------------+------------------------------
 Reporter:  andy         |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Awaiting Review
Component:  Query        |     Version:  3.2
 Severity:  normal       |  Resolution:
 Keywords:               |
-------------------------+------------------------------

Comment (by dd32):

 Replying to [comment:3 solarissmoke]:
 > Replying to [ticket:17551 andy]:
 > > The query parameter `p` works for posts and pages but not attachments.
 When the ID in question refers to an attachment, the result is a 404. Why?
 >
 > But it doesn't issue a 404... it redirects to `?attachment_id=N`

 Only when it's attached to a published post I believe.

 I can't really see a need for a public query var here.. nor private (as
 you set post_type = any, post_status = any for that one). Perhaps wherever
 Stats is getting the post ID from, it should be passing a permalink too..
 either that, or i'm completely mis-understanding the implementation..

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


More information about the wp-trac mailing list