From ba21287c982532a9e0ef7911606c09309ecf3670 Mon Sep 17 00:00:00 2001
From: Vincent Pelletier <vincent@nexedi.com>
Date: Fri, 15 Sep 2006 13:42:57 +0000
Subject: [PATCH] Overload the standard error message to make it lightweight.
 See #488.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@9998 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 .../standard_error_message.xml                | 127 ++++++++++++++++++
 .../bootstrap/erp5_xhtml_style/bt/revision    |   2 +-
 2 files changed, 128 insertions(+), 1 deletion(-)
 create mode 100644 product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/standard_error_message.xml

diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/standard_error_message.xml b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/standard_error_message.xml
new file mode 100644
index 0000000000..10e232714e
--- /dev/null
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/SkinTemplateItem/portal_skins/erp5_xhtml_style/standard_error_message.xml
@@ -0,0 +1,127 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <tuple>
+          <string>Products.PageTemplates.ZopePageTemplate</string>
+          <string>ZopePageTemplate</string>
+        </tuple>
+        <none/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>__ac_local_roles__</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_bind_names</string> </key>
+            <value>
+              <object>
+                <klass>
+                  <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+                </klass>
+                <tuple/>
+                <state>
+                  <dictionary>
+                    <item>
+                        <key> <string>_asgns</string> </key>
+                        <value>
+                          <dictionary>
+                            <item>
+                                <key> <string>name_subpath</string> </key>
+                                <value> <string>traverse_subpath</string> </value>
+                            </item>
+                          </dictionary>
+                        </value>
+                    </item>
+                  </dictionary>
+                </state>
+              </object>
+            </value>
+        </item>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>_text</string> </key>
+            <value> <string encoding="cdata"><![CDATA[
+
+<html>\n
+  <head>\n
+    <title tal:content="template/title">Error</title>\n
+  </head>\n
+  <body>\n
+    <div tal:condition="options/error_message"\n
+         tal:content="structure options/error_message" />\n
+    <div tal:condition="not: options/error_message">\n
+      <h2 i18n:translate="">Site Error</h2>\n
+      <p i18n:translate="">An error was encountered while publishing this resource.</p>\n
+      <p>\n
+        <strong i18n:translate="">\n
+          Error Type:\n
+          <span tal:replace="options/error_type" i18n:name="error_type" />\n
+        </strong>\n
+        <br />\n
+        <strong i18n:translate="">\n
+          Error Value:\n
+          <span tal:replace="options/error_value" i18n:name="error_value" />\n
+        </strong>\n
+        <br />\n
+      </p>\n
+      <hr noshade="noshade" />\n
+      <p i18n:translate="">Troubleshooting Suggestions</p>\n
+      <div tal:condition="python: options[\'error_type\'] in (\'KeyError\', \'NameError\')">\n
+        <ul>\n
+          <li i18n:translate="">This resource may be trying to reference a nonexistent object or variable\n
+            <strong>\n
+              <span tal:replace="options/error_value"\n
+                    i18n:name="error_value" />\n
+            </strong>.\n
+          </li>\n
+          <li i18n:translate="">The URL may be incorrect.</li>\n
+          <li i18n:translate="">The parameters passed to this resource may be incorrect.</li>\n
+          <li i18n:translate="">A resource that this resource relies on may be encountering an error.</li>\n
+        </ul>\n
+      </div>\n
+      <p i18n:translate="">For more detailed information about the error, please refer to the HTML source for this page.</p>\n
+      <p i18n:translate="">If the error persists please contact the site maintainer. Thank you for your patience.</p>\n
+    </div>\n
+    <div tal:condition="options/error_log_url | nothing">\n
+      <hr noshade="noshade" />\n
+      <a tal:attributes="href options/error_log_url"\n
+         i18n:translate="">Show Error Log Entry</a>\n
+    </div>\n
+  </body>\n
+</html>\n
+
+
+]]></string> </value>
+        </item>
+        <item>
+            <key> <string>content_type</string> </key>
+            <value> <string>text/html</string> </value>
+        </item>
+        <item>
+            <key> <string>expand</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>standard_error_message</string> </value>
+        </item>
+        <item>
+            <key> <string>title</string> </key>
+            <value> <string></string> </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
index a5b5e0f805..946b551d71 100644
--- a/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
+++ b/product/ERP5/bootstrap/erp5_xhtml_style/bt/revision
@@ -1 +1 @@
-181
\ No newline at end of file
+191
\ No newline at end of file
-- 
2.30.9