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.

Installing SilverStripe

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

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

404 error pages - doctype changes


Reply

1307 Views

Avatar
bdgraphics

1 December 2009 at 7:20pm Community Member, 5 Posts

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?