I am preparing to upgrade a site from Craft 2 to 3, and would like to make a custom template to deal with the 503 Service Unavailable when the migrations need to be run.
I have set devMode
to false
and tried creating templates/503.html
and also templates/offline.html
, which just contain some plain HTML (no Twig/Craft functions) but each time I get:
An internal server error occurred.
If I turn devMode
back on, I can see where the craft\web\ServiceUnavailableHttpException
is being thrown in craft\web\Application->_processUpdateLogic()
and above it says in comments:
// If an exception gets throw during the rendering of the 503 template, let
// TemplatesController->actionRenderError() take care of it.
However, I can't see this method trying to find and/or serve a 503.html
template, or see what is wrong with the template I've created?