[Zope3-Users] Own packages corrupts ZODB
Florian Lindner
mailinglists at xgm.de
Fri Dec 10 15:01:39 EST 2004
Hello,
I've created a new package which causes a system error very time the ZMI
folder listing of the folder which contains an instance of the object is
listed:
The traceback is:
Traceback (innermost last):
Module zope.publisher.publish, line 138, in publish
result = publication.callObject(request, object)
Module zope.app.publication.zopepublication, line 153, in callObject
return mapply(ob, request.getPositionalArguments(), request)
Module zope.publisher.publish, line 113, in mapply
return debug_call(object, args)
- __traceback_info__: <bound method
ReadContainerXmlObjectView.singleBranchTree of
<zope.app.publisher.browser.viewmeta.ReadContainerXmlObjectView object
at 0x00E2AEB0>>
Module zope.publisher.publish, line 119, in debug_call
return object(*args)
Module zope.app.rotterdam.xmlobject, line 133, in singleBranchTree
name, len(subItem), iconUrl))
ForbiddenAttribute: ('__len__', <CS.centershock.centershock.Centershock
object at 0x01212EF0>)
I have no idea what can cause this.
The only special thing is that the interface has no members:
from zope.interface import Interface
from zope.app.container.interfaces import IContained
class ICentershock(IContained):
"""Main component"""
def __setitem__(name, object):
"""Add a ICentershock object."""
The registration:
<configure xmlns="http://namespaces.zope.org/zope">
<include package=".browser" />
<interface interface=".interfaces.ICentershock"
type="zope.app.content.interfaces.IContentType" />
<content class=".centershock.Centershock">
<implements
interface="zope.app.annotation.interfaces.IAttributeAnnotatable" />
<implements interface="zope.app.container.interfaces.IContentContainer" />
<factory description="centershock.net"/>
<require permission="zope.Public" interface=".interfaces.ICentershock" />
<require permission="zope.Public" set_schema=".interfaces.ICentershock" />
</content>
</configure>
the package browser registration:
<configure xmlns="http://namespaces.zope.org/browser">
<addMenuItem
class="..centershock.Centershock"
title="centershock.net"
description="A centershock.net object"
permission="zope.ManageContent"
/>
<editform
schema="..interfaces.ICentershock"
label="Change centershock.net information"
name="edit.html"
permission="zope.ManageContent"
menu="zmi_views" title="Edit"
/>
<containerViews
for="..interfaces.ICentershock"
index="zope.Public"
contents="zope.Public"
add="zope.ManageContent"
/>
</configure>
what is wrong with that?
Thanks,
Florian
More information about the Zope3-users
mailing list