在Internet Explorer 8上加载wordpress网站的错误 [英] Errors loading wordpress website on Internet Explorer 8

查看:239
本文介绍了在Internet Explorer 8上加载wordpress网站的错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站 - http://www.myhomecare.ie - 使用英镑主题,与IE 8和9兼容。一切运行良好,看起来不错当我在IE 8浏览器中测试它但它突然开始抛出错误并在IE中垂直显示菜单而不是水平显示。

My website - http://www.myhomecare.ie - is a Wordpress Installation using the Sterling theme which is compatible with IE 8 and 9. Everything was running fine and looking good when I tested it in an IE 8 browser but its suddenly started throwing errors and displaying the menu vertically instead of horizontally in IE.

我联系了主题制作者提供的支持但是他们报告说它在IE浏览器中看起来很好。

I contacted the support supplied by the theme makers but they have reported that it looks fine in their IE browsers.

认为它可能只是我的电脑我在办公室的其他电脑上试了一下,发现问题出现在所有工作的电脑上的IE 8上。我们确实在大型网络上工作,因此网络管理员可能以不同的方式配置IE设置,但我仍然需要摆脱这个错误,以防我们的客户正在查看这样的网站。

Thinking it might just be my computer I tried it out on other computers in the office only to find the problem appears on IE 8 on all the computers at work. We do work off a large network so its possible that the network admins have the IE settings configured in a different way but still I need to get rid of this error in case our clients are viewing the site like this.

当我在IE 8中加载网站时,我在屏幕底部收到一条错误消息,显示以下问题:

When I load the site in IE 8 I do get an error message at the bottom of the screen which displays the following issues:

Webpage error details

User Agent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.2; Tablet PC 2.0)
Timestamp: Fri, 17 Aug 2012 09:23:02 UTC


Message: 'jQuery' is undefined
Line: 1
Char: 1
Code: 0
URI: http://myhomecare.ie/wp-content/themes/Sterling/framework/js/IE.js


Message: Expected identifier, string or number
Line: 398
Char: 5
Code: 0
URI: http://myhomecare.ie/wp-content/themes/Sterling/framework/js/custom-main.js?ver=2.0


Message: Expected identifier, string or number
Line: 195
Char: 4
Code: 0
URI: http://myhomecare.ie/

我不是jquer的专家但我确实有一些HTML和CSS知识。我需要一些帮助来理解错误消息的问题。我已经尝试删除我放入主题的自定义代码并禁用最近的插件,但它没有任何区别。我很困惑为什么问题不在所有IE 8浏览器中。如果有人对下一步的故障排除有任何建议,我会非常感激。

I'm no expert with jquery but I do have some html and css knowledge. I need some help understanding what that error message has an issue with. I've tried removing the custom code I had put into the theme and disabling recent plugins but its not made any difference. I'm confused at why the problem is not across all IE 8 browsers. If anyone has any advice about where to go next with troubleshooting this I'd really appreciate it.

推荐答案

第一个错误是引用加载在< head>中的javascript文件使用条件代码指定小于或等于版本8的IE版本。

The first error is referencing a javascript file which is loaded in your <head> using conditional code specifiying versions of IE less than or equal to version 8.

<!--[if lte IE 8]>
<script type="text/javascript" src="http://myhomecare.ie/wp-content/themes/Sterling/framework/js/IE.js"></script>
<![endif]-->

问题是这个代码是在你的标题中调用的,而jQuery是在页脚中调用的。需要先在依赖脚本之前加载jQuery,这就是错误说它未定义的原因。

The issue is that this code is being called in your header, whilst jQuery is being called in the footer. jQuery needs to be loaded first prior to dependant scripts, that's why the error is saying it's undefined.

将上面给出的代码块移到另一个脚本包含下面的页脚中并从那里取出。

Move the code block given above into the footer underneath the other script includes and take it from there.

注意:即使IE8具有相同的未定义错误,它在我的版本上显示正常,但它不是IE7。

Note: Even though IE8 has the same 'undefined' error, it displays fine on my version, it's IE7 which isn't.

编辑*

好的,我们从那里拿走它。下一个错误,在第398行;

OK, we're taking it from there. The next error, on line 398 of;

http://myhomecare.ie/wp-content/themes/Sterling/framework/js/custom-main.js?ver=2.0

被抛出,因为在这个代码块中最后一个同位素参数后面有一个逗号;

is being thrown because in this code block there is a comma after the last isotope paramter;

jQuery('#iso-wrap').isotope({
    animationOptions: {
     duration: 750,
     easing: 'linear',
     queue: false,
     }
});

删除单词false后的逗号。

Remove the comma after the word false.

这也将清除最后一个与第二个错误相关的错误。

This will also clear the last error, which is linked to the second.

根据您的IE版本,这是您提到的网络管理员的问题,没有人这里可以知道它们是如何设置的。

As per your IE versions, that is a question for the network admins you mention, nobody here can know how they are set up.

编辑2

好的,根据您的最新评论,它确切地说和以前一样的问题,在滑块参数的末尾有一个尾随逗号;

OK, based on your latest comment it's exactly the same problem as before, there's a trailing comma at the end of the slider paramters;

在你的页脚中你有;

jQuery(document).ready(function(){
jQuery('#slides').slides({
      preload: false,
      //preloadImage: 'http://files.truethemes.net/themes/sterling-wp/ajax-loader.gif',
      autoHeight: true,
      effect: 'fade',
      slideSpeed: 500,
      play: 4000,
      randomize: false,
      hoverPause: true,
  });

});

摆脱通讯a在最后一次真实之后。

Get rid of the comma after the last true.

这篇关于在Internet Explorer 8上加载wordpress网站的错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆