[wp-trac] [WordPress Trac] #27767: Customizer: Widget settings are lost when activating a previewed theme

WordPress Trac noreply at wordpress.org
Sat Apr 12 13:51:21 UTC 2014


#27767: Customizer: Widget settings are lost when activating a previewed theme
-------------------------------------+--------------------
 Reporter:  ocean90                  |       Owner:
     Type:  defect (bug)             |      Status:  new
 Priority:  highest omg bbq          |   Milestone:  3.9
Component:  Appearance               |     Version:  trunk
 Severity:  blocker                  |  Resolution:
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+--------------------

Comment (by gcorne):

 So, I am still learning my way around some of this code, but I think that
 there are three possible causes for {{{sidebar.getWidgetFormControls()}}}
 not being able to find the widget form controls:

 1. There is a case where {{{sidebars_widgets}}} needs to be overridden
 based on {{{retrieve_widgets( true, false )}}} and it isn't. This could be
 either because it needs to be overridden earlier in the execution or that
 the conditions that control when the overriding occurs is missing a
 situation.

 2. There is a scenario where {{{sidebars_widgets}}} is being overridden
 based on ({{{retrieve_widgets( true, false )}}} when the global
 {{{sidebar_widgets}}} has already been passed through
 {{{retrieve_widgets}}}.

 3. There is a scenario where {{{sidebars_widgets}}} is being overridden,
 but not in the context of the new theme causing a mismatch.

 Because of the layers of filtering involved, getting this right is a bit
 tricky. [attachment:27767-04.patch 27767-04.patch] tries to solve #2 and
 #3, which I think are the most likely causes. I also included a fix to
 {{{customize-widgets.js}}} to fix {{{JQMIGRATE: $(html) HTML strings must
 start with '<' character}}}. I left out the fix that @westonruter came up
 with for the javascript error so that the symptom of the problem is not
 suppressed.

 More testing/review is definitely needed.

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


More information about the wp-trac mailing list