Page MenuHomeIn-Portal Phabricator

D3.id19.diff
No OneTemporary

File Metadata

Created
Thu, Jul 3, 12:03 AM

D3.id19.diff

Index: core/admin_templates/error_fatal.tpl
===================================================================
--- core/admin_templates/error_fatal.tpl
+++ core/admin_templates/error_fatal.tpl
@@ -0,0 +1,55 @@
+<inp2:m_Set skip_last_template="1"/>
+<inp2:m_include t="incs/header"/>
+
+<inp2:m_RenderElement name="combined_header" prefix="adm" section="in-portal:root" title_preset="no_permissions" parent="0"/>
+
+<!-- ToolBar -->
+<table class="toolbar" height="30" cellspacing="0" cellpadding="0" width="100%" border="0">
+ <tbody>
+ <tr>
+ <td id="toolbar_cell">
+ <script type="text/javascript">
+ function prepareToolbar() {
+ a_toolbar = new ToolBar();
+
+ a_toolbar.AddButton(
+ new ToolBarButton(
+ 'prev',
+ '<inp2:m_phrase label="la_ToolTip_Back" escape="1"/>',
+ function() {
+ history.back();
+ }
+ )
+ );
+
+ a_toolbar.Render( $('#toolbar_cell').get(0) );
+ }
+
+ $(document).ready(
+ function() {
+ prepareToolbar();
+ Application.removeDebuggerStatistics();
+ maximizeElement('#fatal_error');
+
+ $('#fatal_error_container').css('background-color', '#F6F6F6');
+ }
+ );
+ </script>
+
+ </td>
+ </tr>
+ </tbody>
+</table>
+
+<div id="fatal_error" class="table-color1" style="bottom: 50%; text-align: center; vertical-align: middle;">
+ <br />
+ <strong>Opps, something went wrong ...</strong>
+ <inp2:m_if check="m_Recall" name="FatalErrorMessage">
+ <br /><br />
+ <div style="text-align: left;">
+ <inp2:m_Recall name="FatalErrorMessage"/><inp2:m_RemoveVar name="FatalErrorMessage"/><br />
+ </div>
+ </inp2:m_if>
+</div>
+
+<inp2:m_include t="incs/footer"/>
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 '<div style="background-color: #FEFFBF; margin: ' . $margin . '; padding: 10px; border: 2px solid red; text-align: center">' . $this->_logger->toString($errno) . '</div>';
+ echo '<div style="background-color: #FEFFBF; margin: ' . $margin . '; padding: 10px; border: 2px solid red; text-align: center">' . $message . '</div>';
- 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 @@
+<!--##
+<NAME>Server Error</NAME>
+<DESC></DESC>
+<SECTION>Platform</SECTION>
+##-->
+
+<!--## SET 500 HEADER FOR RESPONSE ##-->
+<inp2:m_header data="HTTP/1.0 500 Internal Server Error"/>
+<!--## //SET 500 HEADER FOR RESPONSE ##-->
+
+<!--## PAGE TITLE ELEMENT ##-->
+<inp2:m_DefineElement name="page_title">
+ Server Error
+</inp2:m_DefineElement>
+<!--## //PAGE TITLE ELEMENT ##-->
+
+<!--## MAIN CONTENT ##-->
+<inp2:m_DefineElement name="content">
+ Opps, something went wrong ... <a href="javascript:history.back()">Back</a>
+</inp2:m_DefineElement>
+<!--## /MAIN CONTENT ##-->
+
+<!--## DESIGN TEMPLATE ##-->
+<inp2:m_include template="platform/designs/default_design.des" pass_params="1"/>
+<!--## /DESIGN TEMPLATE ##-->

Event Timeline