WordPress.org

Ready to get started?Download WordPress

Forums

WP SyntaxHighlighter
[resolved] undefined variables error (2 posts)

  1. computerslayer1
    Member
    Posted 2 years ago #

    In IE6, two undefined variable errors make the entire page go blank. Normally I wouldn't care about minor issues in IE6, but the page is completely inaccessible in IE6 because of this error.

    line 63
    char:2
    error: 'SyntaxHighlighter' is undefined
    code: 0
    line 768
    char:2
    error: 'SyntaxHighlighter' is undefined
    code: 0

    Line 63 just indicates some HTML which doesn't appear to be at all related to the syntax highlighter (an H3 tag).

    At line 786 is this line:

    SyntaxHighlighter.autoloader(

    Below is the entire code block for the syntax highlighter as it appears in IE6:

    <!-- WP SyntaxHighlighter Ver.1.5.7 Begin -->
    <script type="text/javascript" src="http://localhost/wpsite/content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shCore.js?ver=3.0"></script>
    <script type="text/javascript" src="http://localhost/wpsite/content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shAutoloader.js?ver=3.0"></script>
    <script type="text/javascript" src="http://localhost/wpsite/content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shBrushXml.js?ver=3.0"></script>
    <script type="text/javascript">//<![CDATA[
    	SyntaxHighlighter.autoloader(
    	"applescript	http://localhost/wpsite/content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shBrushAppleScript.js?ver=3.0"
    	,"as3 actionscript3	http://localhost/wpsite/content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shBrushAS3.js?ver=3.0"
    	,"c# c-sharp csharp	http://localhost/wpsite/content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shBrushCSharp.js?ver=3.0"
    	,"css	http://localhost/wpsite/content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shBrushCss.js?ver=3.0"
    	,"js jscript javascript	http://localhost/wpsite/content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shBrushJScript.js?ver=3.0"
    	,"php	http://localhost/wpsite/content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shBrushPhp.js?ver=3.0"
    	,"sql	http://localhost/wpsite/content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shBrushSql.js?ver=3.0"
    	,"xml xhtml xslt html	http://localhost/wpsite/content/plugins/wp-syntaxhighlighter/syntaxhighlighter3/scripts/shBrushXml.js?ver=3.0"
    	);
    	SyntaxHighlighter.defaults['auto-links'] = true;
    	SyntaxHighlighter.defaults['title'] = '';
    	SyntaxHighlighter.defaults['class-name'] = 'notranslate';
    	SyntaxHighlighter.defaults['collapse'] = false;
    	SyntaxHighlighter.defaults['first-line'] = 1;
    	SyntaxHighlighter.defaults['gutter'] = true;
    	SyntaxHighlighter.defaults['pad-line-numbers'] = false;
    	SyntaxHighlighter.defaults['smart-tabs'] = true;
    	SyntaxHighlighter.defaults['tab-size'] = 4;
    	SyntaxHighlighter.defaults['toolbar'] = true;
     SyntaxHighlighter.config.strings.expandSource = '+ expand source';
    	SyntaxHighlighter.config.strings.help = '?';
    	SyntaxHighlighter.config.strings.alert = 'SyntaxHighlighter\n\n';
    	SyntaxHighlighter.config.strings.noBrush = "Can't find brush for: ";
    	SyntaxHighlighter.config.strings.brushNotHtmlScript = "Brush wasn't configured for html-script option: ";
    	SyntaxHighlighter.all();
    
    //]]></script>
    <!-- WP SyntaxHighlighter Ver.1.5.7 End -->

    http://wordpress.org/extend/plugins/wp-syntaxhighlighter/

  2. computerslayer1
    Member
    Posted 2 years ago #

    After digging into this further, it seems that in the template's head, a script tag with a src attribute wasn't properly closed. IE6 was the only browser that caused a fit with this.

    Problem solved.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic