Page 1 of 2 12 LastLast
Results 1 to 10 of 11
  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,823
    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,384
    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
    Breakfast: the most important donut of the day.

  4. #4
    Join Date
    Jan 2004
    Posts
    65,404
    Blog Entries
    7
    Plugin Contributions
    232

    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,140
    Plugin Contributions
    29

    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, Image Checker, Structured Data, BackupMySQL Admin/Auto, Product Listing Sorter, Redsys payment module...

  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
    Hertfordshire, UK
    Posts
    10,285
    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...
    We host with Terranetwork.

  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
    Jun 2005
    Location
    Hertfordshire, UK
    Posts
    10,285
    Plugin Contributions
    3

    Default Re: Doctype for Admin

    Quote Originally Posted by Jarkko View Post
    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.
    That's the point I'm making... the "problem" seems to be occurring because of customisations - not because of problems with the core code.

    If customisations are made to any aspect of any program, then there is a risk of incompatibility.

    Here's a typical scenario I encounter daily...

    When I complete a zencart site, just PRIOR to handover to the client, I run it through W3 validators. I try to get it 100% compliant.

    Within a week - and after clients start adding their own stuff - usually home page text, or product descriptions - I run it through W3 again and a whole host of errors and warnings can appear - all created by my clients not knowing basic HTML protocols. They use the CK-editor, and have no understanding of the underlying generated HTML, so they do not know that a lot of what they are doing is not compliant.

    The point is that ANY customisation can invalidate the integrity of the HTML.

    So... if a developer is doing any custom work, then it is up to that developer to ensure compliance.
    We host with Terranetwork.

  10. #10
    Join Date
    Aug 2007
    Location
    Gijón, Asturias, Spain
    Posts
    2,140
    Plugin Contributions
    29

    Default Re: Doctype for Admin

    well I've been using this in the admin for a very long time:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    as I stated above, for no other reason than to help me validate MY customisations in the admin. It certainly is not necessary to "fix" any inherent problems, in my experience. There are inherent validation errors in the admin html but nothing that breaks anything, it is mostly legacy code and due for big changes anyway at the appropriate time...
    Steve
    github.com/torvista: Spanish Language Pack, Image Checker, Structured Data, BackupMySQL Admin/Auto, Product Listing Sorter, Redsys payment module...

 

 
Page 1 of 2 12 LastLast

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