[wp-trac] [WordPress Trac] #41488: Customize: uncaught JS error with namespaced nav menu fallbacks

WordPress Trac noreply at wordpress.org
Mon Jul 31 20:04:09 UTC 2017


#41488: Customize: uncaught JS error with namespaced nav menu fallbacks
--------------------------+------------------
 Reporter:  dlh           |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  4.9
Component:  Customize     |     Version:  4.3
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:
--------------------------+------------------

Comment (by dlh):

 Given this call:

 {{{
 wp_nav_menu( array(
         'fallback_cb'    => '\birdpress\bird_callback',
         'theme_location' => 'top',
         'menu_id'        => 'top-menu',
 ) );
 }}}

 the value of `partial.params.navMenuArgs.fallback_cb` I see at the line
 mentioned above is `irdpressird_callback`.

 But with this call:

 {{{
 wp_nav_menu( array(
         'fallback_cb'    => '\WordPress\my_callback',
         'theme_location' => 'top',
         'menu_id'        => 'top-menu',
 ) );
 }}}

 the value of `partial.params.navMenuArgs` is a `string`, which throws the
 `'Missing navMenuArgs'` error.

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


More information about the wp-trac mailing list