WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 19 months ago

#19676 closed defect (bug) (worksforme)

404 Error Pages Do Not Display Custom Navigation Menus

Reported by: bozzmedia Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3
Component: Menus Keywords: reporter-feedback
Focuses: Cc:

Description

When calling wp_nav_menu on a 404 page (404.php) no menus are displayed. There may be a potential conflict with numbers in URLs.

This is resolved when permalinks are set to
/%category%/%postname%/

Please see: http://wordpress.org/support/topic/custom-menu-not-displaying-on-404-error-page

Change History (4)

comment:1 dd323 years ago

This sounds like a plugin conflict to me, Probably something hooking into the pre_get_posts filter and modifying all Requests (including the one that builds the menu).

Can verify this on a Clean install of 3.3 running one of the default themes with no plugins?

comment:2 bozzmedia3 years ago

Good point. I tried it with clean Twenty Eleven and could not replicate this.

Have you heard of this 4-digit permalink issue before or what it may be a symptom of? If you visit www.yourdomain.com/111 no custom menu is displayed but www.yourdomain.com/1111 it is. Thanks!

comment:3 dd323 years ago

  • Keywords reporter-feedback close added

Have you heard of this 4-digit permalink issue before or what it may be a symptom of? If you visit www.yourdomain.com/111 no custom menu is displayed but www.yourdomain.com/1111 it is.

/123 will be page 123, /1234 will be year 1234 if using /%year%....%postname%/ permastructs, which would explain why /%category%... works for you.

If there's a plugin which is altering year archives or something, that would cause it.

comment:4 SergeyBiryukov19 months ago

  • Component changed from General to Menus
  • Keywords close removed
  • Milestone Awaiting Review deleted
  • Resolution set to worksforme
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.