#14098 closed defect (bug) (fixed)
'Message' box on Menu management page rendered outside <html> tag
Reported by: | deanjrobinson | Owned by: | nacin |
---|---|---|---|
Milestone: | 3.0.1 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Menus | Keywords: | |
Focuses: | Cc: |
Description
'Message' box on Menu management page rendered outside <html> tag.
Steps to reproduce:
- Activate a theme that doesn't have 'native' support the new custom menus.
- 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)
- 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
Change History (3)
Note: See
TracTickets for help on using
tickets.
(In [15334]) Proper handling of menu nonsupport message. props deanjrobinson, fixes #14098 for trunk.