Commit ed04d7d3 authored by Jérome Perrin's avatar Jérome Perrin

patches: add a compatibility patch for `zope_quick_start`

`zope_quick_start` was a dtml that was removed in Zope commit c8e4cd5ca
(Simplify control panel objects and actually make them non-persistent.,
2016-08-14), but it is referenced in /index_html page template, which
contains:

    <tal:text tal:replace="structure context/zope_quick_start" />

As a result, rendering / is an error page because of KeyError: 'zope_quick_start'

In SlapOS setup, we are using / in an haproxy health check, so the
health check fail and zope is marked as down and haproxy does not send
requests to backend.

We could have an upgrader constraint to repair this page template, but
because of this, zope is unreachable through haproxy, so it's easier to
ressort to monkey patching.
parent ef7d09c8
......@@ -60,8 +60,17 @@ def Folder_isERP5SitePresent(self):
Folder.isERP5SitePresent = Folder_isERP5SitePresent
def Folder_zope_quick_start(self):
"""Compatibility for old `zope_quick_start` that is referenced in
/index_html (at the root)
"""
return 'OK'
Folder.zope_quick_start = Folder_zope_quick_start
security = ClassSecurityInfo()
security.declareProtected(Permissions.ManagePortal, 'isERP5SitePresent')
security.declarePublic('zope_quick_start')
Folder.security = security
InitializeClass(Folder)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment