[wp-trac] [WordPress Trac] #42330: JS error while adding new item to menu using theme customiser.

WordPress Trac noreply at wordpress.org
Wed Oct 25 16:02:31 UTC 2017


#42330: JS error while adding new item to menu using theme customiser.
--------------------------+--------------------
 Reporter:  prajaktag     |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.9
Component:  Customize     |     Version:  trunk
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+--------------------

Comment (by westonruter):

 The reason for the error is that theme is doing
 `$wp_customize->remove_section( 'header_image')` and
 `$wp_customize->add_section( 'background_image')`, but it is not
 subsequently changing the `section` for the controls that were in the
 `header_image` section. So the `background_repeat` control is getting
 added to the Customizer without a containing section. Because of this, the
 `embedded` deferred is never resolved because of this:
 https://github.com/WordPress/wordpress-develop/blob/a33d615/src/wp-
 admin/js/customize-controls.js#L3578-L3590

 And since the `control.linkElements()` is currently being called once
 `embedded` is deferred, the `elements` then never get created. And this is
 why the error is happening.

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


More information about the wp-trac mailing list