[wp-trac] [WordPress Trac] #22687: auto-drafts are improperly stored as the first revision

WordPress Trac noreply at wordpress.org
Sun Dec 2 23:51:03 UTC 2012


#22687: auto-drafts are improperly stored as the first revision
--------------------------+--------------------
 Reporter:  nacin         |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  3.5
Component:  Post Types    |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |
--------------------------+--------------------
Changes (by nacin):

 * keywords:   => has-patch


Comment:

 I added maxcutler's unit test in [UT1162]. [attachment:22687.diff] blocks
 the initial revision from generating a revision (and passes the test). It
 was easier to do this than even start to investigate how WP_Post broke
 this.

 I was curious what would happen to the Revisions meta box with
 [attachment:22687.diff]. Simple: It doesn't appear. You need to save the
 post again to cause a revision and to get the meta box to show. This is
 the behavior prior to the introduction of auto-drafts, as I confirmed also
 in 2.9.

 I thought that this bug didn't exist in 3.4, but it did. I've now been
 able to reproduce it in both 3.4 and 3.0. It seems autosave will fire
 given a few seconds (despite nothing hitting the editor), thus updating
 post_title.

 So, this is definitely not a regression, and doesn't seem like WP_Post has
 any factor here at all. I suggest 3.6-early for [attachment:22687.diff].

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


More information about the wp-trac mailing list