Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#24448 closed defect (bug) (invalid)

Nav menu error

Reported by: looimaster's profile Looimaster Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Menus Keywords:
Focuses: Cc:


Fatal error: Call to a member function get_queried_object() on a non-object in C:\wamp\www\wp\wp-includes\nav-menu-template.php on line 267

The code I use in header.php:

wp_nav_menu(array('sort_column' => 'menu_order', 'theme_location' => 'mobile_menu', 'menu_id' => 'mobile_app_menu'));

I called this 3 times and number 1 & 2 display menu but number 3 breaks the script. Important: it happens only on page that is set to be 'page_for_posts' and nowhere else.

WordPress: 3.6-beta3-24375

Change History (4)

#1 @SergeyBiryukov
11 years ago

  • Component changed from General to Menus

Looks like $wp_query global is unset or overwritten.

#2 @Looimaster
11 years ago

Ah, indeed. This ticket is invalid. In index.php I had it altered. I'm sorry!

#3 @Looimaster
11 years ago

  • Resolution set to invalid
  • Status changed from new to closed

#4 @SergeyBiryukov
11 years ago

  • Milestone Awaiting Review deleted
  • Version trunk deleted
Note: See TracTickets for help on using tickets.