[wp-trac] [WordPress Trac] #14098: 'Message' box on Menu management page rendered outside <html> tag

WordPress Trac wp-trac at lists.automattic.com
Sat Jun 26 06:45:06 UTC 2010


#14098: 'Message' box on Menu management page rendered outside <html> tag
---------------------------+------------------------------------------------
 Reporter:  deanjrobinson  |       Owner:                 
     Type:  defect (bug)   |      Status:  new            
 Priority:  normal         |   Milestone:  Awaiting Review
Component:  Menus          |     Version:  3.0            
 Severity:  normal         |    Keywords:                 
---------------------------+------------------------------------------------
 'Message' box on Menu management page rendered outside <html> tag.

 Steps to reproduce:

 1. Activate a theme that doesn't have 'native' support the new custom
 menus.
 2. Visit menu management page, following message should be shown "The
 current theme does not natively support menus... etc" (page might flicker
 as the message jumps around a little on page load)
 3. View page source of the menu management page, the <div> containing the
 message should appear at the top of the source, above the opening <html>
 tag.

 Tested in both Firefox 3.6 and Safari 5. Using WordPress 3.0 final
 release, with no plugins enabled.

 If php warning/errors are turned on the following is shown when the page
 loads:
 {{{
 Warning: Cannot modify header information - headers already sent by
 (output started at /Users/deanrobinson/Sites/trunk/wp-admin/nav-
 menus.php:453) in /Users/deanrobinson/Sites/trunk/wp-
 includes/functions.php on line 830

 Warning: Cannot modify header information - headers already sent by
 (output started at /Users/deanrobinson/Sites/trunk/wp-admin/nav-
 menus.php:453) in /Users/deanrobinson/Sites/trunk/wp-
 includes/functions.php on line 831
 }}}

 Having had a quick peek at the line of code (453) indicated in the warning
 message it looks like the problem is that the message is being echoed
 instead of being added to the $messages array.

 eg.
 {{{
 echo '<div id="message" class="updated">...
 }}}
 should be
 {{{
 $messages[] = '<div id="message" class="updated">...
 }}}

 Problem looks to have been introduced in the patch attached to ticket
 #13825

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/14098>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list