[wp-trac] [WordPress Trac] #42719: Widgets lost or moved when themes are switched...

WordPress Trac noreply at wordpress.org
Tue Nov 28 00:45:35 UTC 2017


#42719: Widgets lost or moved when themes are switched...
--------------------------+-------------------------------------------
 Reporter:  andon.design  |       Owner:  obenland
     Type:  defect (bug)  |      Status:  accepted
 Priority:  normal        |   Milestone:  4.9.2
Component:  Widgets       |     Version:  4.9
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:  ui, administration, template
--------------------------+-------------------------------------------

Comment (by obenland):

 After debugging, it's not a bug per se, but more of an unfortunate edge
 case :)

 Switching from 2015 to 2017, widgets from `Footer 1` get mapped to 2015's
 `Widget Area`, widgets from `Footer 2` are moved into inactive sidebar,
 since there are no more sidebars to map to.

 Switching 2015 back to 2017, `Widget Area` widgets get assigned to `Blog
 Sidebar` since both have the same id, `sidebar-1`. There are no more
 active widgets, so the mapping stops at that point and just maintains the
 inactive sidebar.

 I guess what we could do however is to not bail here and always try to
 restore from previous settings, essentially just giving that logic a
 chance to retrieve previously active widgets from the inactive side bar.
 That would still not move widgets back to `Footer 1` (rightfully, I'd
 argue), but it would restore `Footer 2`.

 Thoughts?

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


More information about the wp-trac mailing list