Worried That Your Code Does Not Validate

Discussion in 'Pre-Sales Questions' started by klorox, Dec 1, 2010.

  1. klorox

    klorox New Member

    Joined:
    Nov 20, 2010
    Messages:
    7
    Even the demo does not validate properly. This scares me.

    Take this Url: http://demo.amember.com/login.php

    and try to validate it:

    http://validator.w3.org/

    or

    http://htmlhelp.com/tools/validator/

    There are multiple errors/warnings. Does it matter?

    UPDATE: Meant to post http://demo.amember.com/signup.php , login.php validates darn well.

    http://htmlhelp.com/cgi-bin/validate.cgi?url=http://demo.amember.com/signup.php &warnings=yes

    http://validator.w3.org/check?uri=h...e=Inline&group=0&user-agent=W3C_Validator/1.1
  2. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
  3. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
    No Character encoding declared at document level

    No character encoding information was found within the document, either in an HTML meta element or an XML declaration. It is often recommended to declare the character encoding in the document itself, especially if there is a chance that the document will be read from or saved to disk, CD, etc.

    I had to add in the XML info at the top using a PHP echo command.
  4. klorox

    klorox New Member

    Joined:
    Nov 20, 2010
    Messages:
    7
    sorry meant to post http://demo.amember.com/signup.php this has errors.

    On my site, i get an additional error, "there is no attribute "autocomplete"", where the line that has an issue begins:

    <td><input type="text" id="f_login" autocomplete="off"

    EDIT: just to make sure i wasn't crazy, i went through the "sites using amember" forum, and validated a bunch of signup pages, they all failed. Now i know some of it is just poorly coded sites, but the "there is no attribute" error's seem universal.

    http://validator.w3.org/check?uri=h...e=Inline&group=0&user-agent=W3C_Validator/1.1

    http://htmlhelp.com/cgi-bin/validate.cgi?url=http://demo.amember.com/signup.php &warnings=yes
  5. slinky

    slinky Member

    Joined:
    Jul 15, 2010
    Messages:
    200
  6. skippybosco

    skippybosco CGI-Central Partner Staff Member

    Joined:
    Aug 22, 2006
    Messages:
    2,526
    @klorox: The message being reported is a bit misleading as an HTML validator failing on custom defined tags is common as they extend a form beyond what the original standard allowed.

    Take, for example, the fact that a page as visibly simple (but behind the scenes complex) as Google's home page does not validate:

    http://validator.w3.org/check?uri=http://www.google.com

    nor does Amazon:

    http://validator.w3.org/check?uri=http://www.amazon.com

    Are you worried for those sites? Probably not.

    Where you would want to have concern is if there were actual broken HTML (ie. misaligned tags, misspelled declarations, etc.
  7. klorox

    klorox New Member

    Joined:
    Nov 20, 2010
    Messages:
    7
    I actually fully integrated amember into my site, as im not too bad with html/css/php.. was just worried that the amember pages were the only ones that failed to validate on my site. That being said, since it is custom tags failing, and i assume this won't necessarily throw the browser into quirks mode (ie6), i'm no longer worrying about it.

    Slinky, if you could, would you please post the custom xml declaration you use. That is really the only error i would like to correct. Peace.

Share This Page