WordPress.org

Make WordPress Core

Opened 14 months ago

Closed 14 months ago

Last modified 14 months ago

#24448 closed defect (bug) (invalid)

Nav menu error

Reported by: Looimaster Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Menus Keywords:
Focuses: Cc:

Description

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)

comment:1 SergeyBiryukov14 months ago

  • Component changed from General to Menus

Looks like $wp_query global is unset or overwritten.

comment:2 Looimaster14 months ago

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

comment:3 Looimaster14 months ago

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

comment:4 SergeyBiryukov14 months ago

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