Results 1 to 4 of 4
  1. #1
    Join Date
    Jun 2007
    Plugin Contributions

    Default Hidden BOM throwing IE into quirks mode

    I'm just about ready to go live and this is driving me nuts. I was doing some final browser compatibility testing last night and I realized some of the weirdness I was experiencing with IE (specifically, margin:auto not centering certain divs) was due to something sending it into quirks mode. I immediately ran it through the w3c validator and fixed all the usual minor stuff. But there was one obscure error that took me a while to figure out.

    Error - Line 1 column 0: character "" not allowed in prolog.
    ���<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    After some extensive googling, I discovered that this can be caused by Unicode documents being saved with a three character Byte Order Mark at the beginning of the file. This can cause problems in PHP files. At first I thought it must be html_header.php, since the BOM seems to be appearing before the DOCTYPE declaration, but it doesn't seem to be the case. I've opened every custom template file, /index.php, and every other file I could think of in BBEdit and manually switched the file type to "UTF-8, no BOM." Still, I have the error. I've run them through a batch text encoding switcher app. Still no dice.

    My setup is like this: My store is served as UTF-8, and my database is encoded in UTF-8. The store has a Japanese and an English side - I use two slightly different versions of the same template for each. The weird thing is that the Japanese side validates. I tried temporarily replacing all the english template files with the Japanese ones to see if that fixed it. That didn't work, so it must be elsewhere. The next most likely place is the language files, but I've converted and replaced all the language files as well without success.

    I have no idea where this is coming from, but it's a critical bug.

  2. #2
    Join Date
    Jun 2007
    Plugin Contributions

    Default Re: Hidden BOM throwing IE into quirks mode

    Well, I ended up opening three quarters of the files in my zen cart install in a hex editor and found a couple random language files where the extra characters had been added. None of them seemed related, but I reuploaded everything, and that seems to have fixed it.

  3. #3

    Default Re: Hidden BOM throwing IE into quirks mode

    It's possible you are finding an FTP bug, more than a Zen-Cart one.

    ASCII mode transfers, especially in FTP clients like CuteFTP for Windows -- seem to mess with the character encoding of the files, UTF-8 to ISO-8859-1 & so forth.

    I always make sure ASCII files are transfered in UTF-8 format before I do any uploading -- and haven't had a problem with multi-lingual setups since.



Similar Threads

  1. IE9 Developer Tools HTML1113: Document mode restart from Quirks to IE9 Standards
    By torvista in forum Templates, Stylesheets, Page Layout
    Replies: 0
    Last Post: 13 Jul 2011, 10:18 PM
  2. Unable to get into upgrade mode
    By ele_ in forum Upgrading from 1.3.x to 1.3.9
    Replies: 11
    Last Post: 9 Dec 2010, 01:49 AM
  3. Can't login into admin mode
    By tomcon in forum Installing on a Windows Server
    Replies: 4
    Last Post: 16 Jun 2007, 11:48 PM
  4. Put Zencart into showroom mode How?
    By kili in forum General Questions
    Replies: 2
    Last Post: 21 Nov 2006, 08:37 PM
  5. Paypal - switching into a test mode
    By limbo90 in forum Addon Payment Modules
    Replies: 3
    Last Post: 6 Sep 2006, 07:43 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
Zen-Cart, Internet Selling Services, Klamath Falls, OR