[wp-trac] [WordPress Trac] #43625: When there are invalid items in a menu, the customizer enters an infinite loop of refreshing when trying to render wp_nav_menu.

WordPress Trac noreply at wordpress.org
Sat Mar 24 07:02:12 UTC 2018


#43625: When there are invalid items in a menu, the customizer enters an infinite
loop of refreshing when trying to render wp_nav_menu.
---------------------------------+-----------------------------------------
 Reporter:  flamboyantpretender  |       Owner:
     Type:  defect (bug)         |      Status:  new
 Priority:  normal               |   Milestone:  Awaiting Review
Component:  Customize            |     Version:  4.9.5
 Severity:  normal               |  Resolution:
 Keywords:                       |     Focuses:  javascript, administration
---------------------------------+-----------------------------------------

Comment (by flamboyantpretender):

 Update: Can confirm, adding a page link to the menu and then later on
 removing that page renders a menu item "invalid".

 Update2: It seems the error is actually triggered by calling another outer
 file into play.

 I created a new file:

 {{{#!php
 <?php
 <?php

 function echo_hey() {
     echo 'hey';
 }

 ?>
 }}}

 Linked it up within my functions.php, as such:

 {{{#!php
 <?php
 require_once( get_template_directory_uri() . '/inc/echo_hello.php');
 }}}

 Then, within my header.php (or really anywhere), I called it:

 {{{#!php
 <?php
 echo_hey();
 }}}

 This printed the 'hey' but sent the Customizer into the refresh loop and
 generated this error at times:

 {{{#!php
 <?php
 ( ! ) Warning: Cannot modify header information - headers already sent by
 (output started at C:\xampp\htdocs\wordpress\wp-
 content\themes\s-master\includes\Sprout\Contact\ContactBlock.php:16) in
 C:\xampp\htdocs\wordpress\wp-admin\includes\misc.php on line 1114

 }}}

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


More information about the wp-trac mailing list