• Resolved timothyleetaylor

    (@timothyleetaylor)


    Hi all,

    I’m running into an issue where my Firefox browser breaks my theme (only showing my header and footer, with css displaying incorrectly, though still loading any HTML).

    I’m not sure what the error is. I’ve opened the JS error logs in Firebug, and tested other themes (which seem to work fine). So I think the error lies somewhere in my theme.

    The page loads fine in Safari with all JS.

    Any ideas on this?

    Thanks,
    Lee

Viewing 8 replies - 1 through 8 (of 8 total)
  • Validate your site:

    https://validator.w3.org/

    Check the Show Source option and then click Revalidate to easily locate any errors in your code.

    Thread Starter timothyleetaylor

    (@timothyleetaylor)

    Thanks @iridiax,

    I’ve done this, and haven’t seen anything crucial yet.

    Here’s a specific error in Firefox: “_gat is not defined”.
    I get this when including any Google Analytics code, though it only happens in Firefox.

    I think there are two issues here:
    1. Any JS error (I’ll keep looking through validation code and fixing a few errors)
    2. Firefox error with Google Analytics

    Any ideas?
    (Maybe by finding a fix for #1, I’ll find a fix for #2…)

    Thank you,
    Lee

    Thread Starter timothyleetaylor

    (@timothyleetaylor)

    Hi @iridiax,

    I have validated my markup and CSS. I still receive a blank page in IE 7, and in Firefox, though Safari is displaying correctly.

    Please help!!
    Thank you.

    Thread Starter timothyleetaylor

    (@timothyleetaylor)

    I notice the error is somehow happening due to the Javascript includes within the header.php template file of my theme.

    I’m posting it here for reference in case you see anything I’m missing:

    <head profile="https://gmpg.org/xfn/11">
    	<meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    	<meta name="generator" content="<?php bloginfo('version'); ?>" />
    	<meta name="robots" content="index,follow,noarchive" />
    	<meta name="keywords" content="" />
    	<meta name="description" content="" />
    	<title><?php bloginfo('name'); ?><?php wp_title(); ?></title>
    
    	<link rel="credits" href="https://www.oursite.com" type="rel" />
    	<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    
    	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery-1.2.3.pack.js" />
    	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery-easing.1.2.pack.js" />
    	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery-easing-compatibility.1.2.pack.js" />
    	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/coda-slider.1.1.1.js" />
    	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/jquery.highlight.js" />
    	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/menu.js" />
    	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/lavaLamp.js" />
    	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/contact.js" />
    
    	<link rel="shortcut icon" href="<?php bloginfo('template_directory'); ?>/favicon.ico" type="image/x-icon" />
    	<link rel="alternate" type="application/rss+xml" title="RSS feed for <?php bloginfo('name'); ?>" href="<?php bloginfo('rss2_url'); ?>" />
    	<link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />
    
    	<?php if (is_page_template('home.php')): ?>
    	<script src="<?php bloginfo('template_directory'); ?>/js/home.js" type="text/javascript" />
    	<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/home.css" type="text/css" media="screen" />
    	<?php //echo "Home page"; ?>
    	<?php elseif (is_page_template('about.php')): ?>
    	<script src="<?php bloginfo('template_directory'); ?>/js/about.js" type="text/javascript" />
    	<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/about.css" type="text/css" media="screen" />
    	<?php //echo "About page"; ?>
    	<?php elseif (is_page_template('services.php')): ?>
    	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/services.js" />
    	<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/services.css" type="text/css" media="screen" />
    	<?php //echo "Services page"; ?>
    	<?php elseif (is_page_template('work.php')): ?>
    	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/work.js" />
    	<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/work.css" type="text/css" media="screen" />
    	<?php //echo "Our Work page"; ?>
    	<?php elseif (is_page_template('index.php')): ?>
    	<script type="text/javascript" src="<?php bloginfo('template_directory'); ?>/js/blog.js" />
    	<link rel="stylesheet" href="<?php bloginfo('template_directory'); ?>/css/blog.css" type="text/css" media="screen" />
    	<?php //echo "Blog page"; ?>
    	<?php endif; ?>

    Any help would be appreciated as I go through and search how WordPress particularly handles JS includes.

    Thanks.

    Thread Starter timothyleetaylor

    (@timothyleetaylor)

    FYI:

    Fixed on my error. Wasn’t including the JS files via this function:
    <?php wp_enqueue_script(); ?>

    Issue Solved.

    I’m using the same slider jquery script as you and I’m having trouble here is the page, https://www.line47.com/discography/

    Any help would be lovely!

    Thanks in advance!

    hey guys,

    I am trying to use coda slider with the On Demand theme, somehow it is not working for me, firbug throws the following error…

    $(“#slider”).serialScroll is not a function
    (?)()()
    (?)()()
    (?)()()
    (?)()(function () { return a.call(this, D); }, function(), undefined)
    (?)()()
    [Break on this error] $(‘#slider’).serialScroll(scrollOptions);

    any help would be greatly appreciated.

    Fixed the problem… WP pngfix plugin was conflicting with the slider!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘WordPress theme breaks in Firefox with any JS inside <body> tags’ is closed to new replies.