[wp-trac] [WordPress Trac] #24161: Updating long post quickly could result in post truncation

WordPress Trac noreply at wordpress.org
Tue Apr 23 00:45:21 UTC 2013


#24161: Updating long post quickly could result in post truncation
-----------------------------+--------------------------
 Reporter:  archon810        |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Editor
  Version:  3.5.1            |   Severity:  critical
 Keywords:                   |
-----------------------------+--------------------------
 I've observed a bug yesterday when updating a 10,000 word post frequently
 while testing another feature. The last update ended up eating almost half
 of the post at the end and went unnoticed until today when it was pointed
 out by users.

 I've examined the update history and indeed found the last update to not
 contain a good portion of the post - it just cuts off.

 The only explanation I have for this behavior is that because the post is
 so long, the update button was pressed while the textarea field was still
 loading, which interrupted the loading process and submitted whatever was
 loaded at the time. This is very dangerous - a race condition like that
 could demolish long posts or posts on slower connections.

 A solution here should be a validation function that makes sure the post
 was loaded before the Update button is clickable. Perhaps just tie the
 onload to the Update button so it's disabled until the browser confirms
 things are loaded. I'm open to other suggestions, but I'm now definitely
 scared of one of the authors or myself accidentally truncating content.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/24161>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list