[英]IE9 Quirks mode - Doctype statement commented out
I'm having an issue where IE9 is rendering a single page on my site in Quirks mode. 我遇到一个问题,即IE9以Quirks模式在我的网站上呈现单个页面。
http://www.bettereverafter.com/index.php?fc=module&module=blockwishlistpro&controller=view&token=E5D343F0E9D5C666 http://www.bettereverafter.com/index.php?fc=module&module=blockwishlistpro&controller=view&token=E5D343F0E9D5C666
For some reason, it is taking the DOCTYPE delcaration in my header file and commenting out. 由于某种原因,它会将DOCTYPE代入我的头文件中并注释掉。 The Doctype I am using is:
我正在使用的Doctype是:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
It seems to be pulling in some additional code, which I think is coming from here: 它似乎正在引入一些其他代码,我认为这是从这里来的:
It looks like it is getting called here: 似乎在这里被调用:
private function _displayProducts($id_wishlist)
{
global $cookie;
include_once(dirname(__FILE__).'/WishListpro.php');
include_once(_PS_CLASS_DIR_.'/Message.php');
echo "
<script type='text/javascript'>
// <![CDATA[
ThickboxI18nImage = 'Image';
ThickboxI18nOf = '/';
ThickboxI18nClose = 'X';
ThickboxI18nOrEscKey = 'Esc';
ThickboxI18nNext = '>';
ThickboxI18nPrev = '<';
tb_pathToImage = '"._MODULE_DIR_.self::modulename."/img/loadingAnimation.gif';
//]]>
</script>";
My issue is, that code is not actually in the header file, it's coming from somewhere else. 我的问题是,该代码实际上不在头文件中,而是来自其他地方。 I have no idea how it is getting loaded before the actual header file though...
我不知道如何在实际的头文件之前加载它...
I have already tried adding but that doesn't do anything. 我已经尝试添加,但是什么也没做。
Every other page seems to work fine, just this one. 每隔一页似乎都可以正常工作,仅此一页。 If I force it into IE9 Standards, it looks fine.
如果我将其强制为IE9标准,则看起来不错。 Any ideas would be much appreciated!
任何想法将不胜感激!
The problem is caused by having this code before your doctype: 此问题是由您的doctype之前的代码引起的:
<script type='text/javascript'>
// <![CDATA[
ThickboxI18nImage = 'Image';
ThickboxI18nOf = '/';
ThickboxI18nClose = 'X';
ThickboxI18nOrEscKey = 'Esc';
ThickboxI18nNext = '>';
ThickboxI18nPrev = '<';
tb_pathToImage = '/modules/blockwishlistpro/img/loadingAnimation.gif';
//]]>
</script>
You cannot have anything (not even a comment) before your doctype or IE will render in quirks mode instead of standards mode. 在文档类型或IE将以怪癖模式而不是标准模式呈现之前,您将什么都没有(甚至没有评论)。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.