Results 1 to 10 of 11

Hybrid View

  1. #1
    Join Date
    Aug 2007
    Location
    Fort Worth, Texas, United States
    Posts
    177
    Plugin Contributions
    0

    Default Doctype for Admin

    On my ZC1.5.0 shop, I noticed that my admin doctype is different from my main site. In admin, it uses <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">which causes IE9 to go in quirk mode. Very annoying.

    My main shop site is using

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    Is there a reason for this? Can I go ahead an update my files to match my shop? I thought I would ask before going through all the files. UGH

  2. #2
    Join Date
    Aug 2005
    Location
    Arizona
    Posts
    27,761
    Plugin Contributions
    9

    Default Re: Doctype for Admin

    Quit using IE and get with a more compliant browser
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Nov 2006
    Location
    Dartmouth, NS Canada
    Posts
    2,378
    Plugin Contributions
    0

    Default Re: Doctype for Admin

    Quote Originally Posted by TrvlFox View Post
    On my ZC1.5.0 shop, I noticed that my admin doctype is different from my main site. In admin, it uses <!doctype html public "-//W3C//DTD HTML 4.01 Transitional//EN">which causes IE9 to go in quirk mode. Very annoying.
    I'm curious. Why does IE being in Quirks mode cause you to be very annoyed. (IE doesn't exist on Macs, so I can't just look for myself.)

    As for the admin doctype, the admin code is quite old. Revising it now just to make it XHTML compliant would be a very annoying task.

    Rob

  4. #4
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Doctype for Admin

    I don't recall anybody else complaining that it was triggering any problems in IE9. Not sure what your specific issues are.
    The admin doctype is completely unrelated to your catalog/storefront doctype.

    While the doctype is changing to "html" for HTML5 support in v1.6.0, if you blindly go and change it without ensuring all other dependencies are addressed, you might create yourself more problems.

    You REALLY should figure out what exactly is the real root of the problem that's causing the annoyance you mentioned, rather than jumping to change a doctype that nobody else is reporting any problems about.
    .

    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.

  5. #5
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,586
    Plugin Contributions
    30

    Default Re: Doctype for Admin

    There's no reason why it has to match the shop doctype. The admin code is html not xhtml anyway.

    Many moons ago I changed it to a valid doctype (html not xhtml) with no problems.

    Why change it at all? Well when I start to hack about in admin page for my own ends, first I fix the existing html errors so I can easily correct the new ones I introduce and the html checkers I use need a valid doctype to work with.

    Previously I never saw anything broken as a result of quirks mode, but I only use IE for a final check after doing dev work with FFox.

    Unless you can't actually do something in the admin as a result, what does it matter?
    Steve
    github.com/torvista: Spanish Language Pack, Google reCaptcha, Structured Data, Multiple Copy-Move-Delete, Image Checker, BackupMySQL Admin/Auto...

  6. #6
    Join Date
    Jan 2013
    Posts
    7
    Plugin Contributions
    0

    Default Re: Doctype for Admin

    Quote Originally Posted by DrByte View Post
    You REALLY should figure out what exactly is the real root of the problem that's causing the annoyance you mentioned, rather than jumping to change a doctype that nobody else is reporting any problems about.
    I report problems. Quirks mode causes massive problems in modern web development, for example the flashcanvas doesn't work in quirks mode, resulting that you can't develop anything with canvas-elements which would support any IE-browsers. And the problem REALLY is that Zen Cart admin sends doctype that causes all browsers to go to quirks mode.

    I would recommend doctype for Zen Cart to be used with dtd, which doesn't force browsers to quirks mode:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    Or perhaps even more bulletproof would be Strict:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
    Last edited by Jarkko; 23 Jan 2013 at 09:31 AM.

  7. #7
    Join Date
    Jun 2005
    Location
    Cumbria, UK
    Posts
    10,263
    Plugin Contributions
    3

    Default Re: Doctype for Admin

    Quote Originally Posted by Jarkko View Post
    I report problems. And the problem REALLY is that Zen Cart admin sends doctype that causes all browsers to go to quirks mode.
    I have never experienced this in ANY browser, so the problem you are reporting may be of your own making. I have installed nearly 300 zencart sites, across versions starting from 1.2.5 back in 2004.

    Additionally, I have progressed through all versions of MSIE (though as Kobra concurs, I seldom if ever use it because it is a hugely problematic browser for professional developers. I just do quick tests in MSIE to make sure everything works for my clients - and as I said, in the last 9 years I have NEVER had a "quirks" issue with it when accessing admin areas in MSIE.

    Arbitrarily changing the doctype is not advised...
    20 years a Zencart User

  8. #8
    Join Date
    Jan 2013
    Posts
    7
    Plugin Contributions
    0

    Default Re: Doctype for Admin

    Quote Originally Posted by schoolboy View Post
    I have never experienced this in ANY browser, so the problem you are reporting may be of your own making. I have installed nearly 300 zencart sites, across versions starting from 1.2.5 back in 2004.

    Additionally, I have progressed through all versions of MSIE (though as Kobra concurs, I seldom if ever use it because it is a hugely problematic browser for professional developers. I just do quick tests in MSIE to make sure everything works for my clients - and as I said, in the last 9 years I have NEVER had a "quirks" issue with it when accessing admin areas in MSIE.

    Arbitrarily changing the doctype is not advised...
    Have you developed any modules for admin area that uses canvas for example, or customized any part of admin area accordingly? Sure, it works out of the box, but quirks mode really isn't developer friendly if you really want to develop modern web pages/applications.
    Last edited by Jarkko; 23 Jan 2013 at 10:20 AM.

  9. #9
    Join Date
    Jan 2004
    Posts
    66,373
    Blog Entries
    7
    Plugin Contributions
    274

    Default Re: Doctype for Admin

    Quote Originally Posted by Jarkko View Post
    for example the flashcanvas doesn't work in quirks mode, resulting that you can't develop anything with canvas-elements which would support any IE-browsers.
    Yes, that would be a problem.

    You can change it. But you'll have to touch a lot of files to make it happen, depending on which pages you intend to add canvas elements for. And test that you've not broken anything else that might have been depending on the original doctype.

    As I said before, v1.6.0 is being updated to use HTML5 ... and unfortunately it's not a simple matter of touching just a couple files.
    In the meantime, make whatever changes you need for yourself, and be sure to test that you've not broken anything else in the process.
    .

    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.

 

 

Similar Threads

  1. v1.2.x [Done v1.6.0] admin->option_values type invalid doctype
    By torvista in forum Bug Reports
    Replies: 2
    Last Post: 14 Dec 2013, 03:53 PM
  2. v139h DOCTYPE with comment tags in IE
    By caprimia in forum General Questions
    Replies: 0
    Last Post: 17 Feb 2012, 04:59 PM

Bookmarks

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
Zen-Cart, Internet Selling Services, Klamath Falls, OR