Add pageUnavailable_handling for system problems and maintenance
There are already several places in the TYPO3 Core where an HTTP 503 Not Available header is sent in response to major problems rendering the page. This occurs mainly when a database connection is unavailable or there's a serious problem getting the requested page and template. In each of these cases, the 503 header is sent and a specific, but static a error message is displayed.
I would propose that we add an equivalent to pageNotFound_handling for the times when a page is unavailable. This would allow a customized maintenance page to automatically be displayed when problems occur (ie. database goes down) and for the normal site to return immediately when those problems are resolved. I'd also suggest an Install Tool setting to manually turn this maintenance page off and on whenever the site admin is performing maintenance.
I'm attaching an inital version of patch for this. It adds some Install Tool settings to t3lib/config_default.php and mimics the pageNotFound_handling in tslib_fe. There's also a small addition to tslib/index_ts.php that checks if pageUnavailable has been forced after TSFE is created, but before a database connection is attempted.
The one thing this patch does not currently handle is the "Page is being generated" message since there's some additional complexity with it.
(issue imported from #M7150)
#1 Updated by Steffen Kamper almost 12 years ago
This patch works for me.
Great, i requested such a feature some time ago.
Setting this in localconf.php
$TYPO3_CONF_VARS['FE']['pageUnavailable_force'] = 1;
will show in FE:
Reason: This page is temporarily unavailable.
Thanks Jeff for this great patch!