[wp-trac] [WordPress Trac] #20350: get_page_by_title() query can return unpublished page or page revision

WordPress Trac wp-trac at lists.automattic.com
Tue Apr 3 17:52:44 UTC 2012


#20350: get_page_by_title() query can return unpublished page or page revision
--------------------------+------------------------------
 Reporter:  wpdavis       |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+------------------------------

Comment (by wpdavis):

 @duck_ and @nacin:
 Hate to argue with you guys, but the revisions are most definitely not a
 separate post type, unless something is seriously wrong with all my
 WordPress installs. They are set using the inherit post status.

 Here is the result of the query that we're seeing on our WordPress
 install. As you can see the two results returned are a published page and
 a revision for that same page. This tracks for all revisions on our
 install, as far as I can tell.

 1064506 inherit page            Video   1064504-revision-2
 1064504 publish page            Video   video

 As to the question of whether to make publish the default, I'm fine if it
 isn't but I think at the very least nonpublic post statuses should be
 filtered out by default.

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


More information about the wp-trac mailing list