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.

Archive

Our old forums are still available as a read-only archive.

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

Doctypes


Reply

3 Posts   1757 Views

Avatar
KatB

21 February 2008 at 4:01pm Community Member, 94 Posts

One day I will make sense of the whole world :)

Why is it that when I open up a Silverstripe page in my browser, my selected doctype appears in the source when viewed, however, the W3C validator is picking up a different doctype? Where is this other doctype coming from?

Avatar
DesignCity

21 February 2008 at 9:24pm 38 Posts

Hmmm... I'm going to hazzard a guess at this one -it's a bit of a leap, stop me if i'm way off ;)

Silverstripe has a Content Negotiator, which, among other things, detects what content you're sending the browser and changes the doctype of the page accordingly. Maybe thats whats got into your pages?

Easy fix and test: add ContentNegotiator::disable(); to your _config.php file to disable the content negotiator and ?flush=1 the site and check if it works now...

Hope it helps!

Avatar
Willr

21 February 2008 at 10:15pm Forum Moderator, 5511 Posts

See http://doc.silverstripe.com/doku.php?id=html - Under DOCTYPES. That might be of a help to you