silverstripe / silverstripe-errorpage

ErrorPage module for Silverstripe CMS
BSD 3-Clause "New" or "Revised" License
2 stars 17 forks source link

ErrorPage's with a StatusCode of 500 doesn't work properly with subsites #35

Closed gavinjolly closed 5 years ago

gavinjolly commented 5 years ago

Refer to ticket I raised in the support desk

I've had a deep look into this, to summarise, ErrorPage's with a StatusCode of 500 doesn't work properly on CWP with subsites

Currently the instance has an old error page on in the gateway server which is being served though is not being updated by the web-server. This lack of updating is basically a limitation of the subsites module running on CWP.

What should happen is an assets/error-500.html gets generated when you save an ErrorPage with a StatusCode of 500, which automatically gets get copied to the gateway server ever 2 hours. However, what is happening is that the subsite module suffixes the filename with the primary domain of the current subsite

One possible workaround is to upload a file via the CMS to assets/error-500.html which should get picked up by the gateway server. The file manager currently shows 0 kb file there, which means there's an old database record associated with the file, but the file itself is not there. I'd recommend you delete that first.

Keep in mind though that uploading this will be shared across all subsites, so it will need to be fairly generic and have minimal styling

Another option is we can delete the old file from the gateway server and instead there will be a generic 'Website is down is down for maintenance' message.

robbieaverill commented 5 years ago

Could you please provide the CWP recipe version you’re using?

Possible related issues or duplicates: https://github.com/silverstripe/silverstripe-subsites/issues/439 https://github.com/silverstripe/silverstripe-subsites/issues/438

ScopeyNZ commented 5 years ago

It sounds like a problem with the hosting solution you are using. Following it up with their support desk sounds like the best course of action. Please feel free to comment again and/or re-open this issue if it cannot be resolved with the helpdesk