[wp-trac] [WordPress Trac] #18642: _edit_lock timestamp does not update on autosave() of non-changed, non-draft posts

WordPress Trac wp-trac at lists.automattic.com
Sun Sep 11 21:42:01 UTC 2011


#18642: _edit_lock timestamp does not update on autosave() of non-changed, non-
draft posts
-----------------------------------+------------------
 Reporter:  benbalter              |       Owner:
     Type:  defect (bug)           |      Status:  new
 Priority:  normal                 |   Milestone:  3.3
Component:  Autosave               |     Version:  3.3
 Severity:  minor                  |  Resolution:
 Keywords:  2nd-opinion has-patch  |
-----------------------------------+------------------

Comment (by duck_):

 I believe this occurs even when post content is changed (and it's not a
 draft) as edit_post() only occurs on autosave for changed (auto-)drafts,
 see admin-ajax.php line 972 - 984. The content changing only affects
 whether or not a revision gets written to the DB.

 So I think the situations are:

  1. It's a changed (auto-)draft and is overwritten by edit_post() which
 updates the post lock
  1. Otherwise, the post lock isn't updated as `isset( $_POST['auto_draft']
 ) && ( $_POST['auto_draft'] != '1'` is never true.

 i.e. _edit_lock is not updated when not draft ''or'' not changed.

 Verified by editing a post, adding to the content, waiting for the
 autosave to occur and then checking that the value in the database hasn't
 changed.

 Anyway it's the same fix. Good catch.

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


More information about the wp-trac mailing list