[wp-trac] [WordPress Trac] #42603: Widgets Warning after activating theme and on dashboard widgets page

WordPress Trac noreply at wordpress.org
Sat Nov 18 23:57:30 UTC 2017


#42603: Widgets Warning after activating theme and on dashboard widgets page
--------------------------+-----------------------------
 Reporter:  ionvv         |       Owner:  obenland
     Type:  defect (bug)  |      Status:  assigned
 Priority:  normal        |   Milestone:  4.9.1
Component:  Widgets       |     Version:  4.9
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  administration
--------------------------+-----------------------------

Comment (by obenland):

 I was able to recreate the issue with the themes shown in the youtube
 video. For the bug to occur, the following set of conditions have to
 apply:

 1. A theme had to be switched to from a theme that had fewer registered
 sidebars.
 1. It had to be active during the upgrade to 4.9.
 1. It has to be switched away from.
 1. It has to be activated again, with the previously active theme having
 at least one registered sidebar that does not have the same slug as a
 sidebar in the theme being switched to.

 Congrats @ionvv for finding a bug that I'd consider pretty rare and hard
 to find :)
 Attached test—when run without the fix—will surface the bug.

 Fixing it is thankfully more straight forward than reproducing it, and we
 even get a small performance improvement out of this. By removing empty
 sidebars prior to mapping, we fix the bug and also cut down on the amount
 of mapping iterations we need to do.

 @ionvv & @chetan200891 would you mind double-checking
 [attachment:42603.2.diff]?

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


More information about the wp-trac mailing list