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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

Installing SilverStripe /

Getting SilverStripe up and running on your computer and on your web server.

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

404 error pages - doctype changes


Go to End


2043 Views

Avatar
bdgraphics

Community Member, 5 Posts

1 December 2009 at 7:20pm

Hi everyone,

I am having an issue with 404 error pages that I can't seem to get around.

When publishing a custom error page (404) the page.ss is being used like for normal pages but the doctype itself is being changed.

FROM:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" >

TO:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en" >

It is xhtml 1.1 for all of the content pages but changes to strict html with the error page. this is throwing a parsing error in the browser. It also seems to strip all the closing tags in the head.

I have deleted the 404 page in assets and disabled the Content Negotiator, reflushed and rebuilt all to no avail.

Is the headers and meta being created by the CMS itself?