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

WordPress Trac noreply at wordpress.org
Fri Feb 19 06:39:35 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
--------------------------------------+--------------------------

Comment (by westonruter):

 Replying to [comment:72 ocean90]:
 > * 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`.
 > * 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

 These are addressed in [attachment:27355.6.diff]. As in the screenshots
 above, when a partial's content is rendered the parsing of the HTML is
 wrapped in a try/catch block, and in the case of an error being thrown the
 error will be displayed at the end of the partial's container. In addition
 to a JS script error, it also captures `document.write()` calls which
 likewise blow away the preview.

 > *  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)

 Looking at this now.

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


More information about the wp-trac mailing list