Index: core/admin_templates/error_fatal.tpl =================================================================== --- core/admin_templates/error_fatal.tpl +++ core/admin_templates/error_fatal.tpl @@ -0,0 +1,55 @@ + + + + + + + + + + + + +
+ + +
+ +
+
+ Opps, something went wrong ... + +

+
+
+
+
+
+ + Index: core/install/upgrades.sql =================================================================== --- core/install/upgrades.sql +++ core/install/upgrades.sql @@ -3004,3 +3004,10 @@ CHANGE SSLUrl SSLDomainName VARCHAR(255) NOT NULL DEFAULT '', CHANGE SSLUrlUsesRegExp SSLDomainNameUsesRegExp TINYINT(4) NOT NULL DEFAULT '0'; DELETE FROM UserPersistentSessionData WHERE VariableName = 'site-domain[Default]columns_.'; + +UPDATE SystemSettings +SET VariableName = 'NotFoundErrorTemplate' +WHERE VariableName = 'ErrorTemplate'; + +INSERT INTO SystemSettings (VariableId, VariableName, VariableValue, ModuleOwner, Section, Heading, Prompt, ElementType, Validation, ValueList, DisplayOrder, GroupDisplayOrder, Install, HintLabel) +VALUES (DEFAULT, 'FatalErrorTemplate', 'error_fatal', 'In-Portal', 'in-portal:configure_advanced', 'la_section_SettingsWebsite', 'la_config_error_template', 'text', '', '', 10.04, 0, 0, null); Index: core/kernel/utility/logger.php =================================================================== --- core/kernel/utility/logger.php +++ core/kernel/utility/logger.php @@ -1150,10 +1150,17 @@ protected function _displayFatalError($errno) { $errno = $this->_getFatalErrorTitle($errno); + $message = $this->_logger->toString($errno); + if ( $this->Application->isDebugMode() ) { - $margin = $this->Application->isAdmin ? '8px' : 'auto'; + $margin = $this->Application->isAdmin ? '8px' : 'auto'; - echo '
' . $this->_logger->toString($errno) . '
'; + echo '
' . $message . '
'; - exit; + exit; + } + else { + $this->Application->StoreVar('FatalErrorMessage', $message); + $this->Application->Redirect($this->Application->ConfigValue('FatalErrorTemplate')); + } } /** @@ -1364,4 +1371,4 @@ return $res; } -} \ No newline at end of file +} Index: themes/advanced/error_fatal.tpl =================================================================== --- themes/advanced/error_fatal.tpl +++ themes/advanced/error_fatal.tpl @@ -0,0 +1,25 @@ + + + + + + + + + Server Error + + + + + + Opps, something went wrong ... Back + + + + + +