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, Ed, biapar, Willr, Ingo, swaiba

Failed w3c markup validation

Go to End

3 Posts   1910 Views


Community Member, 5 Posts

20 December 2008 at 5:16am

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.



Community Member, 470 Posts

20 December 2008 at 8:29am

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.


Community Member, 5 Posts

20 December 2008 at 12:00pm

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