Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions

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

Failed w3c markup validation


Reply

3 Posts   1260 Views

Avatar
paulie

20 December 2008 at 5:16am Community Member, 5 Posts

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

Avatar
Liam

20 December 2008 at 8:29am Community Member, 470 Posts

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.

Avatar
paulie

20 December 2008 at 12:00pm Community Member, 5 Posts

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; :-)