dynamic / silverstripe-maintenance-mode

Maintainance/Offline Mode Module for SilverStripe
BSD 2-Clause "Simplified" License
21 stars 18 forks source link

Doesn't work with the Static Publisher module #3

Closed xiehan closed 9 years ago

xiehan commented 9 years ago

This maybe should've been obvious to me before I tried it, but I was curious and went ahead anyway... We're using staticpublisher and presumably because of that, putting the site in Maintenance mode did absolutely nothing.

I'm guessing some kind of extra URL rewrite would be needed, but doing that as-needed would defeat the purpose of the one-click-ness of this module, and I'm not sure if the standard URL rewrites needed for staticpublisher are compatible with the way this module works.

dljoseph commented 9 years ago

Hi @xiehan, Thanks for bringing this to my attention. I've never used the static publisher module, but I'll definitely look into it.

dljoseph commented 9 years ago

@xiehan This module now produces a static error page in the assets directory on dev/build assets/error-503.html There are 2 URL rewrite rules in the .htaccess file for 404 and 500 error pages: ErrorDocument 404 /assets/error-404.html ErrorDocument 500 /assets/error-500.html Presumably, you would have to add another for the error-503.html file: ErrorDocument 503 /assets/error-503.html

Does this help?

dljoseph commented 9 years ago

@xiehan - After discussing this today with @sminnee, @dhensby and @zauberfisch at the 2015 SilverStripe European Conference (https://stripecon.eu), we concluded that you are, indeed, correct - this kind of module will not work with static publisher. Additional rewrite rules would be required and possibly more development to make it possible. However, this is outside of the scope of the use case for which this module was developed. So, closing as a non-issue.