[Zope-CMF] Re: Where is getProperty?

yuppie y.2007- at wcm-solutions.de
Fri Jun 29 04:37:02 EDT 2007


Charlie Clark wrote:
> Just udated to trunk and am now getting errors,

You have been warned:

> every time 
> utils.decode() is called:
> Module Products.CMFDefault.utils, line 463, in decode
> AttributeError: getProperty
> def decode(value, context):
>     """ Decode value using default_charset.
>     """
>     ptool = getUtility(IPropertiesTool)
>     default_charset = ptool.getProperty('default_charset', None)
>     return toUnicode(value, default_charset)
> I can't see getProperty defined anywhere. No tests are failing.

Looks like your utility isn't acquisition wrapped - getProperty is 
usually acquired from the site root.

1.) Your site seems to broken, there is currently no migration code that 
updates the lookup class if you have an old site manager instance.

2.) getProperty should become part of the IPropertiesTool interface and 
implementation. It should not rely on acquisition.



More information about the Zope-CMF mailing list