Make WordPress Core

Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#14098 closed defect (bug) (fixed)

'Message' box on Menu management page rendered outside <html> tag

Reported by: deanjrobinson's profile deanjrobinson Owned by: nacin's profile 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:

  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

Change History (3)

#1 @nacin
14 years ago

  • Milestone changed from Awaiting Review to 3.0.1
  • Owner set to nacin
  • Status changed from new to accepted

#2 @nacin
14 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

(In [15334]) Proper handling of menu nonsupport message. props deanjrobinson, fixes #14098 for trunk.

#3 @nacin
14 years ago

[15335] for 3.0

Note: See TracTickets for help on using tickets.