Jump to:

23374 Posts in 18175 Topics by 2866 members

General Questions

SilverStripe Forums » General Questions » Failed w3c markup validation

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1238 Views
  • paulie
    Avatar
    Community Member
    5 Posts

    Failed w3c markup validation Link to this post

    I have a basic installation of Silverstripe. I have added two pages. The site seems to fail validation though. When I look at the code in the HTML view, the tag that is supposed to be closed without having been opened (/p), is not there.

    It is present in the source code of the page that is rendered by the browser, but i cant find it anywhere else.

    --------------------------------------------------------------------------------------
    Line 54, Column 2445: end tag for element "P" which is not open.
    …" ></a> </td></tr></tbody></table></p>
    --------------------------------------------------------------------------------------

    This </p> is not in the file that is included above or below this line.

    Also, why does the site doc type read as html 4 and not xhtml ?

    I dont see how I can fix this, nor anyone else for that matter but though id post here just in case.

    Thanks

  • Liam
    Avatar
    Community Member
    470 Posts

    Re: Failed w3c markup validation Link to this post

    There must be an error in the html somewhere in one of the template files, or possibly in the content field in the admin section. Are you using a pre made theme or custom? The closing </p> tag must be stuck in there somewhere.

    As for the doctype being rewritten, this is SilverStripe's doing and can be disabled in your config file by adding ContentNegotiator::disable(); to it.

  • paulie
    Avatar
    Community Member
    5 Posts

    Re: Failed w3c markup validation Link to this post

    Thanks for your help. It was a pre built template called Higher Ground. The site now validates to xhtml 1.1 standards. The </p> tag error disappeared when i removed the <p></p> surrounding $content in templates/layout/page.ss;

    1238 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.