[wp-trac] [WordPress Trac] #7392: Don't create new autosave revision if nothing has changed yet

WordPress Trac noreply at wordpress.org
Thu Jan 24 03:43:10 UTC 2013


#7392: Don't create new autosave revision if nothing has changed yet
-------------------------------------------------+-------------------------
 Reporter:  Otto42                               |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  3.6
Component:  Autosave                             |     Version:  2.6
 Severity:  minor                                |  Resolution:
 Keywords:  has-patch needs-testing 3.6-early    |
  autosave-redo                                  |
-------------------------------------------------+-------------------------

Comment (by adamsilverstein):

 Replying to [comment:14 azaozz]:
 > This happens only when the Visual editor is default (is shown first).
 Caused by running the post_content through wpautop before outputting it in
 the textarea (TinyMCE needs the <p>), so the first `autosaveLast` (used to
 determine if something has changed) gets post_content with <p> and is
 later compared to post_content without <p>.
 >
 > There are better ways to do that, should be fixed with the autosave
 updates in 3.6.

 i've noticed this doesn't get fired if i create a post and publish it with
 just a title without entering any content.

 in addition to the extra autosave, this winds up creating an extra
 revision, so creating a post with title and content starts out with two
 revisions, the 1st one is title only, the 2nd has title and content. thats
 confusing to users - see #9843. the current patch seems to do too much by
 checking for duplication, can we just check for the initial state you
 mention and skip the first and only the first autosave?

 going to test the current patch anyway.

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


More information about the wp-trac mailing list