[Zope] Problem with Zope 2.2.0 and changing a ZClass property

Shane Hathaway shane@digicool.com
Mon, 17 Jul 2000 17:16:13 -0400


Jochen Knuth wrote:
> 
> Hi,
> 
> trying to update a ZClass based Product to Zope 2.2.0 i get the
> following Error and Traceback:
> 
> Error Type: ValueError
> Error Value: Invalid property value: wrapped object
> 
> Traceback (innermost last):
>   File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 222,
> in publish_module
>   File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 187,
> in publish
>   File /usr/local/Zope-2.2.0/lib/python/Zope/__init__.py, line 221, in
> zpublisher_exception_hook
>     (Object: ElementWithAttributes)
>   File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 171,
> in publish
>   File /usr/local/Zope-2.2.0/lib/python/ZPublisher/mapply.py, line 160,
> in mapply
>     (Object: postit)
>   File /usr/local/Zope-2.2.0/lib/python/ZPublisher/Publish.py, line 112,
> in call_object
>     (Object: postit)
>   File /usr/local/Zope-2.2.0/lib/python/OFS/DTMLMethod.py, line 167, in
> __call__
>     (Object: postit)
>   File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_String.py,
> line 502, in __call__
>     (Object: postit)
>   File /usr/local/Zope-2.2.0/lib/python/DocumentTemplate/DT_Util.py,
> line 337, in eval
>     (Object: propertysheets.properties.manage_changeProperties(REQUEST))
>     (Info: REQUEST)
>   File <string>, line 0, in ?
>   File /usr/local/Zope-2.2.0/lib/python/OFS/PropertySheets.py, line 443,
> in manage_changeProperties
>     (Object: Traversable)
>   File /usr/local/Zope-2.2.0/lib/python/OFS/PropertySheets.py, line 255,
> in _updateProperty
>     (Object: Traversable)
>   File /usr/local/Zope-2.2.0/lib/python/OFS/PropertySheets.py, line 208,
> in _wrapperCheck
>     (Object: Traversable)
> ValueError: (see above)
> 
> The error occurs in a method i defined in a ZClass. The beginning of the
> method is:
> 
> <dtml-var standard_html_header>
> <dtml-call "REQUEST.set('editor',AUTHENTICATED_USER)">
> <dtml-call "REQUEST.set('edit_date', ZopeTime())">
> <dtml-call "propertysheets.properties.manage_changeProperties(REQUEST)">
> <dtml-call reindex_object>
> [...]
> 
> The method is called from a edit form of a ZClass instance as the form
> action.
> 
> Is there anything wrong with the method or is there something other to
> look at?

Try changing:
  <dtml-call "REQUEST.set('editor',AUTHENTICATED_USER)">
to:
  <dtml-call "REQUEST.set('editor',AUTHENTICATED_USER.getUserName())">

Shane