[wp-trac] [WordPress Trac] #49532: Clicking "preview" multiple times on a post causes an identical autosave revision to be created and destroyed repeatedly

WordPress Trac noreply at wordpress.org
Fri Jan 27 22:02:15 UTC 2023


#49532: Clicking "preview" multiple times on a post causes an identical autosave
revision to be created and destroyed repeatedly
-------------------------------------------------+-------------------------
 Reporter:  inwerpsel                            |       Owner:
                                                 |  adamsilverstein
     Type:  defect (bug)                         |      Status:  closed
 Priority:  normal                               |   Milestone:  6.2
Component:  Revisions                            |     Version:  5.4
 Severity:  normal                               |  Resolution:  fixed
 Keywords:  has-patch needs-testing dev-         |     Focuses:  rest-api,
  feedback has-unit-tests commit                 |  performance
-------------------------------------------------+-------------------------
Changes (by adamsilverstein):

 * status:  assigned => closed
 * resolution:   => fixed


Comment:

 In [changeset:"55154" 55154]:
 {{{
 #!CommitTicketReference repository="" revision="55154"
 Revisions: only create autosave when content changed.

 In the autosave REST API endpoint, avoid excessive database writes when an
 autosave is sent with content that is unchanged from the saved post.

 Before this fix, clicking "preview" in the editor (which uses the autosave
 feature) multiple times would cause an identical autosave entry to be
 deleted and re-created repeatedly.

 Props inwerpsel, aduth, mukesh27, ironprogrammer.
 Fixes #49532.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49532#comment:30>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list