Results 1 to 7 of 7
  1. #1
    Join Date
    Jul 2004
    Location
    stroud, gloucestershire
    Posts
    205
    Plugin Contributions
    1

    Default W3c failing on login page with 'autocomplete' attribute

    Hi All,

    I just have 1 page on my website that wont validate the W3C standards and thats my login page. There is a line that is generated in the page as below


    <input type="text" name="should_be_empty" size="40" id="CAAS" style="visibility:hidden; display:none;" autocomplete="off" />

    The autocomplete="off" is what is invalid as it doesnt recognise the attribute. Would it be disasterous if this was removed?

    Cheers

    Paul
    Even novices can be professionals!

    Funky Fancy Dress

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

    Default Re: W3c failing on login page with 'autocomplete' attribute

    Code:
     id="CAAS"
    This is not part of a default install

    Where was this ID defined - what addon or customization?
    Zen-Venom Get Bitten

  3. #3
    Join Date
    Jul 2004
    Location
    stroud, gloucestershire
    Posts
    205
    Plugin Contributions
    1

    Default Re: W3c failing on login page with 'autocomplete' attribute

    Hi Kobra,

    I have double checked and this is in my standard includes/templates/template_default/templates/tpl_modules_create_account.php file so i must be part of the standrad zencart programming??

    I am using 1.5.1 and the full line of php is on line 68

    zen_draw_input_field('should_be_empty', '', ' size="40" id="CAAS" style="visibility:hidden; display:none;" autocomplete="off"');


    Regards
    Even novices can be professionals!

    Funky Fancy Dress

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

    Default Re: W3c failing on login page with 'autocomplete' attribute

    My Bad...
    I do not see this error on a default install
    See HERE
    Zen-Venom Get Bitten

  5. #5
    Join Date
    Jul 2004
    Location
    stroud, gloucestershire
    Posts
    205
    Plugin Contributions
    1

    Default Re: W3c failing on login page with 'autocomplete' attribute

    Correct, it is not an on page error, it is a validation error on the W3c site

    Please caheck here
    Even novices can be professionals!

    Funky Fancy Dress

  6. #6
    Join Date
    Feb 2012
    Location
    mostly harmless
    Posts
    1,809
    Plugin Contributions
    8

    Default Re: W3c failing on login page with 'autocomplete' attribute

    The autocomplete attribute was not part of the HTML 4.01 or XHTML 1.0/1.1 specification... It is part of the (X)HTML5 specification.

    This attribute instructs browsers to not save any data for the field (password in this case) for form auto completion. Some browsers will honor this attribute even when used in HTML 4.01 and XHTML 1.0/1.1 document types. Personally I'd just ignore the validation error.

    If one must pass validation, one can omit the autocomplete attribute. One workaround to keep the behavior this attribute adds... Is to use javascript to add the attribute after the page loads... But this just makes the page pass some validation tools, but the page will still not conform to the specification after the javascript has run.
    The glass is not half full. The glass is not half empty. The glass is simply too big!
    Where are the Zen Cart Debug Logs? Where are the HTTP 500 / Server Error Logs?
    Zen Cart related projects maintained by lhûngîl : Plugin / Module Tracker

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

    Default Re: W3c failing on login page with 'autocomplete' attribute

    Quote Originally Posted by Wilkesy View Post
    The autocomplete="off" is what is invalid as it doesnt recognise the attribute. Would it be disasterous if this was removed?
    In that case, yes, you would have problems if you removed it.
    Besides, as lhungil has said, it's harmless, and while in the absolute purest sense it's technically an invalid attribute (only because it's not part of the various renditions of the HTML4 spec because HTML4 was spec'd before autocomplete was conceived of), it is supported by all major browsers and serves a very specific purpose.

    The correct course of action is to consider it as acceptable, and ignore the extremely minor w3c validation "error". It is perfectly acceptable to use, with extremely rare exceptions (and you'll never encounter those exceptions if you're asking the questions you're posing here).
    .

    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. Trying to add attribute but failing
    By TheBlueDragon in forum Setting Up Categories, Products, Attributes
    Replies: 7
    Last Post: 23 Dec 2014, 09:34 PM
  2. v151 Upgrade from 1.3.9h to 1.5.1 - Attribute Controller Failing in Admin
    By handylabels in forum Upgrading to 1.5.x
    Replies: 13
    Last Post: 6 Jul 2014, 02:48 PM
  3. v139h Admin login still failing after all the expert suggestions...
    By marcumpatrick in forum General Questions
    Replies: 1
    Last Post: 3 May 2013, 08:44 AM
  4. Admin login failing when domain name is changed
    By Fooey in forum Templates, Stylesheets, Page Layout
    Replies: 8
    Last Post: 16 Dec 2009, 08:52 PM
  5. Admin Login Failing
    By WendyLady in forum General Questions
    Replies: 0
    Last Post: 4 Aug 2007, 01:47 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