WordPress.org

Make WordPress Core

Changes between Initial Version and Version 5 of Ticket #22307


Ignore:
Timestamp:
10/29/12 18:51:41 (2 years ago)
Author:
lancewillett
Comment:

I was able to repeat, but only when removing the entire navigation markup -- not just without a navigation menu since that case was already heavily tested and accounted for.

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #22307

    • Property Keywords needs-patch added
    • Property Summary changed from Javascript error in 2012 theme if not using nav to Twenty Twelve: JavaScript error if not removed navigation wrapper markup
    • Property Component changed from Themes to Bundled Theme
    • Property Milestone changed from Awaiting Review to 3.5
  • Ticket #22307 – Description

    initial v5  
    1 I'm getting this error on a page that isn't using the header or nav. 
     1I'm getting this error on a page that isn't using the header or nav. [Edit by lancewillett: This only occurs when the entire nav markup is removed.] 
    22 
     3{{{ 
    34Error: TypeError: document.getElementById("site-navigation") is null 
    45Source File: /wp-content/themes/twentytwelve/js/navigation.js?ver=1.0 
    56Line: 7 
     7}}} 
    68 
    79Can a check be added into the Twenty Twelve theme to make sure #site-navigation exists on the page?