Doing some on-site consulting on an old Zope CMS that has been developed by many different developers over many years. It's pretty good and has lots of powerful features but over the years certain things have been allowed to slip. One problem was that you couldn't click the "Properties" tab. The reason was that it was trying to fetch properties that didn't exist anymore. What had happened was that the class attribute _properties (which is used by the "Properties" tab in the ZMI) had been stored as a persistent attribute. Here's how to solve that:


def manage_fixPropertiesProblem(self):
    """ fix so _properties becomes a class attribute instead """
    if '_properties' in self.__dict__.keys():
        del self._properties

    return "Awesome!"

Comments

Anonymous

try: del self._properties
except AttributeError: pass

Your email will never ever be published.

Previous:
V8 < TraceMonkey < SquirrelFish September 23, 2008 Web development
Next:
Why bother with MySQL... October 9, 2008 Linux
Related by category:
'Cache-Control' or Expires September 16, 2005 Zope
To all Zope developers: Does this sound familiar? March 8, 2011 Zope
IssueTrackerProduct now officially abandoned March 30, 2012 Zope
Sending HTML emails in Zope October 26, 2006 Zope
Related by keyword:
EditArea vs. CodePress January 3, 2008 Web development
Persistent caching with fire-and-forget updates December 14, 2011 Python, Tornado
DateIndex in Zope doesn't have indexed attributes October 28, 2007 Zope
MUnderscorePatch - tired of typing manage_main? November 29, 2006 Zope