[wp-trac] [WordPress Trac] #22686: wp.getRevisions returns auto-drafts

WordPress Trac noreply at wordpress.org
Sun Dec 2 23:07:56 UTC 2012


#22686: wp.getRevisions returns auto-drafts
--------------------------+------------------------
 Reporter:  maxcutler     |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:
Component:  XML-RPC       |     Version:  trunk
 Severity:  normal        |  Resolution:  duplicate
 Keywords:  needs-patch   |
--------------------------+------------------------
Changes (by nacin):

 * status:  new => closed
 * resolution:   => duplicate
 * milestone:  Awaiting Review =>


Comment:

 Great, that helps a lot. It's a much deeper bug, so I opened #22687
 instead.

 When a post is created with wp_insert_post(), it will have zero revisions,
 as verified with test_revision_count().

 When a post is created with get_default_post_to_edit(), such as via XML-
 RPC or the standard Add New screen, it will end up with a single revision.
 This is the revision you are seeing.

 The fix for 3.5 should be to set the post_title properly on this first
 revision. In 3.6, I'd like to avoid the revision all together.

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


More information about the wp-trac mailing list