[wp-trac] [WordPress Trac] #51425: Customizer Restore Autosave Notice dismiss function is not called

WordPress Trac noreply at wordpress.org
Mon Oct 19 11:18:13 UTC 2020


#51425: Customizer Restore Autosave Notice dismiss function is not called
-------------------------------------+-----------------------------
 Reporter:  karthikbhatb             |       Owner:  (none)
     Type:  defect (bug)             |      Status:  new
 Priority:  normal                   |   Milestone:  5.6
Component:  Customize                |     Version:
 Severity:  normal                   |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:  ui, javascript
-------------------------------------+-----------------------------

Comment (by karthikbhatb):

 Hi,

 Thanks for tidying up the ticket.

 Steps to reproduce the issue:
 1. Install fresh WordPress 5.5.1
 2. Navigate to `wp-admin/customize.php`
 3. Make any change/s (do not hit publish / do not save)
 4. Reload the page (confirm reload by clicking the `reload` alert button)
  - This gives the following notice: `There is a more recent autosave of
 your changes than the one you are previewing. Restore the autosave`
 5. Try to dismiss the notice. Notice disappears, but notice area doesn't
 collapse
 6. Reload the page. The notice appears once again, expected behavior would
 be to not see the notice again.


 I could not track down what changes caused the issue (tried with trac. any
 help/link on how to do this for the future is appreciated.)

 Anyway, what I found is that the notice dismissal and admin ajax call on
 `.notice-dismiss` is already handled in
 https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/wp/customize/base.js#L912
 and
 https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/wp/customize/controls.js#L8360

 It would not make sense for `makeNoticesDismissible` in
 https://core.trac.wordpress.org/browser/trunk/src/js/_enqueues/admin/common.js#L1092
 to override that.

 Let me know if there is more to it.

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


More information about the wp-trac mailing list