[wp-trac] [WordPress Trac] #27355: Customizer: Add framework for selective refresh (partial preview refreshes)

WordPress Trac noreply at wordpress.org
Thu Feb 18 12:39:39 UTC 2016


#27355: Customizer: Add framework for selective refresh (partial preview refreshes)
--------------------------------------+--------------------------
 Reporter:  westonruter               |       Owner:  westonruter
     Type:  task (blessed)            |      Status:  reviewing
 Priority:  normal                    |   Milestone:  4.5
Component:  Customize                 |     Version:  3.4
 Severity:  normal                    |  Resolution:
 Keywords:  has-patch has-unit-tests  |     Focuses:  javascript
--------------------------------------+--------------------------
Changes (by ocean90):

 * owner:  ocean90 => westonruter


Comment:

 * Widgets: When adding a widget to an empty sidebar I get a JS error:

 {{{
 Uncaught TypeError: this.targetWindow is not a function @ customize-
 base.js?ver=4.5-alpha-35776-src-1455792213:707
 api.Messenger.api.Class.extend.receive @ customize-
 base.js?ver=4.5-alpha-35776-src-1455792213:707
 n.isFunction.d  @ jquery.js?ver=1.12.0:2
 n.event.dispatch @ jquery.js?ver=1.12.0:3
 r.handle @ jquery.js?ver=1.12.0:3
 }}}

 * Nav Menus: When I enter "Foo<" into the input field for a menu item
 title I get a PHP warning:

 {{{
 Object {partial: "nav_menu_instance[c306e5285ebf74fc00b87f1d9b839d2a]",
 error_number: 8, error_string: "Uninitialized string offset: 1",
 error_file: "/srv/www/wp-develop/svn/src/wp-includes/formatting.php",
 error_line: 377} @ customize-selective-
 refresh.js?ver=4.5-alpha-35776-src-1455794958:604
 Object {partial: "nav_menu_instance[c306e5285ebf74fc00b87f1d9b839d2a]",
 error_number: 8, error_string: "Uninitialized string offset: 1",
 error_file: "/srv/www/wp-develop/svn/src/wp-includes/formatting.php",
 error_line: 377} @ customize-selective-
 refresh.js?ver=4.5-alpha-35776-src-1455794958:604
 }}}
 (Note: It seems like something is called twice on menu updates.)
 * In `WP_Customize_Nav_Menus::filter_wp_nav_menu_args()` some docs for
 `$can_partial_refresh` might be helpful.
 * `WP_Customize_Widgets::filter_wp_kses_allowed_data_attributes()` should
 have the `public` keyword and not `@access private`.
 * In `WP_Customize_Widgets::end_dynamic_sidebar()` let's remove the
 `assert()` line.
 * Running all unit tests dies at ~17%: `Starting test
 'Tests_DB::test_bail'. Database is dead.`. It seems like
 `Test_WP_Customize_Selective_Refresh_Ajax` is the culprit because it runs
 on the default group and defines `DOING_AJAX`.


 ----
 Other notes:
 *  Nav Menus: Probably unrelated: Assign an author the
 `edit_theme_options` cap and enter "foo'foo" into the input field for a
 menu item title: For some reasons the preview will have slashes.
 (https://cloudup.com/ccKXry0gjDC)
 * Nav Menus: Users with the `unfiltered_html` cap can break the
 customizer, the same happens without the patch too, see
 https://gist.github.com/ocean90/db41b33785679b85c73a

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


More information about the wp-trac mailing list