Results 1 to 3 of 3
  1. #1
    Join Date
    Jun 2008
    Posts
    59
    Plugin Contributions
    0

    Default 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

  2. #2
    Join Date
    Jan 2004
    Posts
    66,446
    Plugin Contributions
    81

    Default 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
    .

    Zen Cart - putting the dream of business ownership within reach of anyone!
    Donate to: DrByte directly or to the Zen Cart team as a whole

    Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
    Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

  3. #3
    Join Date
    Jun 2008
    Posts
    59
    Plugin Contributions
    0

    Default 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

 

 

Similar Threads

  1. IE7 / compatibility mode centerBox problem
    By marknew in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 29 Sep 2011, 12:19 PM
  2. IE8 compatibility mode layout error
    By manfer72 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 16 Feb 2010, 09:49 AM
  3. How to Force IE8 to IE7 Compatibility Mode?
    By hcd888 in forum General Questions
    Replies: 2
    Last Post: 19 Oct 2009, 01:32 AM
  4. Replies: 18
    Last Post: 13 Jul 2009, 12:31 AM
  5. IE compatibility mode problems
    By DML73 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 1 Jul 2009, 04:32 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg