[wp-trac] [WordPress Trac] #49859: Post autosave called multiple times

WordPress Trac noreply at wordpress.org
Thu Apr 9 12:15:18 UTC 2020


#49859: Post autosave called multiple times
--------------------------+-----------------------------
 Reporter:  Rufus87       |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Autosave      |    Version:  5.4
 Severity:  major         |   Keywords:
  Focuses:  javascript    |
--------------------------+-----------------------------
 Hi everyone.

 I found an issue, which is mostly not related to wordpress core but the
 fix should be handled in wp core itself.

 autosave.js works just great except one point.

 If there is move than one wysiwyg editor in admin post edit screen (no
 matter how it is added, in my case it is created ACF plugin, but it can be
 just a custom meta box field implemented as wysiwyg editor field ), and
 there is and autosave for current post, then 'tinymce-editor-
 init.autosave' jquery event triggered on jQuery(document) will call
 checkPost() js method wysiwyg editors count times. As a result "The backup
 of this post in your browser is different from the version below" notice
 is rendered the same count times.

 If there are 6 wysiwyg editors including wp native one (I have 5 custom
 ones), 'tinymce-editor-init.autosave' is called 6 times, and as a result
 "The backup of this post in your browser is different from the version
 below" notice is rendered 6 times.

 This is very easy to reproduce.

 Please review.

 Thanks in advance.
 Rafik I.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/49859>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list