[wp-trac] [WordPress Trac] #30638: Missing dataType in Customizer Widgets

WordPress Trac noreply at wordpress.org
Tue Dec 9 07:32:52 UTC 2014


#30638: Missing dataType in Customizer Widgets
--------------------------+-----------------------------
 Reporter:  iseqqavoq     |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Customize     |    Version:  4.0.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 In wp-admin/js/customize-widgets.js line 980 the dataType parameter is
 missing for jQuery post method.
 This results in return value getting read as a string instead of json
 object.

 Scenario: User edits widget via Customize panel, an error gets shown.

 '''Suggestion:'''

 change
 {{{
 jqxhr = $.post( wp.ajax.settings.url, data );
 }}}
 into
 {{{
 jqxhr = $.post( wp.ajax.settings.url, data, function(){}, 'json' );
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30638>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list