Zen Cart Logo
Forums / Templates, Stylesheets, Page Layout / IE8 compatibility mode

IE8 compatibility mode

Locked

Views: 1,481

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
4 Nov 2009, 12:48 AM
#1
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

IE8 compatibility mode

Hi everyone,

I wonder if someone could help me please.

I've been investigating an error where my website gives a blank page on the product info page but only on my new host and only if there is only one product in the category.

The page is blank and the error logs show nothing at all.

I followed the very helpful instructions on this forum and installed the "enable_error_logging.php" tool. The error recorded is:

[04-Nov-2009 00:23:53] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/firstpe/public_html/includes/languages/english.php:702) in /home/firstpe/public_html/includes/init_includes/init_templates.php on line 78
[04-Nov-2009 00:23:53] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/firstpe/public_html/includes/languages/english.php:702) in /home/firstpe/public_html/includes/functions/functions_general.php on line 44

I now see that the problem is regarding the header being written too soon and it is caused by three lines which I added at the end of \includes\languages\english.php:

<!--[if IE 8]> <meta http-equiv="X-UA-Compatible" content="IE=7" /> <![endif]-->

I added these three lines a while ago because my template looks terrible in IE8. As mentioned above this "fix" works fine on my current/old host and on all other pages on the site on the new host but it breaks the product page on the new site if there is only one product in the category. (I have proven that this is the issue by removing the three lines and sure enough everything works fine on the new host (but the template looks terrible)).

I wonder if someone could advise me of a better place for me to paste those three lines of code or perhaps a better way of doing this?

Many thanks in advance

Simon Dale

4 Nov 2009, 1:17 AM
#2
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: IE8 compatibility mode

The english.php file is the wrong place to put <META> tags.
Instead, put them in your html_header.php file, along with the other <META> tags already there.

The following link, taken from the "Similar Threads" section below this discussion, and from doing a search on the topic, talks about the same matter: http://www.zen-cart.com/forum/showthread.php?t=139619

4 Nov 2009, 2:26 AM
#3
simondale123 avatar

simondale123

New Zenner

Join Date:
Jun 2008
Posts:
60
Plugin Contributions:
0

Re: IE8 compatibility mode

All fixed! I removed the three lines from english.php and put them on line 21 of html_header.php.

That's the first line which isn't PHP. Any lower than that and the browser ignores it.

Thanks so much for your help

Simon