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

WordPress Trac noreply at wordpress.org
Mon Nov 2 02:50:43 UTC 2020


#51425: Customizer Restore Autosave Notice dismiss function is not called
-----------------------------------+-----------------------------
 Reporter:  karthikbhatb           |       Owner:  noisysocks
     Type:  defect (bug)           |      Status:  reviewing
 Priority:  normal                 |   Milestone:  5.6
Component:  Customize              |     Version:  5.5
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:  ui, javascript
-----------------------------------+-----------------------------
Changes (by noisysocks):

 * keywords:  has-patch needs-testing => has-patch 2nd-opinion


Comment:

 Welcome @karthikbhatb! Thanks for the bug report and PR.

 I ran `git bisect` with `5.4.0` as the last known good commit and found
 that r48925 (#51123) is what caused this regression.

 Adding `common` as a dependency of `updates` has the unintended side
 effect of loading `common` in `customize.php`. This breaks notices because
 now **both** `customize-controls` and `common` are initialising notices.

 The attached PR does indeed fix this error by making `common` return early
 if notices have already been initialised, but I think it would be better
 if we fixed the underlying issue here and made it so that notices are only
 initialised once.

 I'm not sure why r48925 added `common` as a dependency of `updates`. Maybe
 it's unnecessary? Seeking a second opinion here.

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


More information about the wp-trac mailing list