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.

Themes /

Discuss SilverStripe Themes.

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

Creating Forbidden Error Page

Go to End

3 Posts   1414 Views


Community Member, 3 Posts

21 September 2011 at 10:11pm


(Using SimpleStripe theme)

I've created a Forbidden error page and it successfully saves and publishes, and I can see the error-403.html file in the .../silverstripe/assets folder.

Problem is is that the error-403.html file that has been saved is just a blank html file.

Any idea what could be causing this, and how to fix it?



Forum Moderator, 1391 Posts

22 September 2011 at 2:20am

I've seen that too... For the moment I don't think it can be fixed.

When SilverStripe calls the 403 errorpage, a blank page is returned, and that's what's written to the static file in assets as well... It has something to do with the ErrorPage_Controller::init() method setting the error status to 403 for this errorpage - and I somehow guess that it is now forbidden to SilverStripe as well :-)

I suppose what you could do is copy the contents of one of the other error pages in assets, and tweek the html. Then add the custom errorpage to .htaccess...


Community Member, 3 Posts

22 September 2011 at 4:26am

Edited: 22/09/2011 4:29am

Hi Martinez

Thanks for the reply

For now I've copied the code that the 'Page not found' error-404.html file contents into the blank error-403.html file, changed the wording and it now works correctly, i.e. I get the forbidden page displayed within my website design.

I also added the reference in the .../silverstripe/.htaccess file. (ErrorDocument 403 /assets/error-403.html)

Just another thing to remember I've 'fixed' in the future.