[Zope] Problems with manage_afterAdd in Python Product
Sven Rudolph
rudolph@medical-tribune.de
Thu, 10 Apr 2003 19:39:41 +0200
Hello all,
I have written a small product called MyProduct:
MyProduct(CatalogAware,Implicit,Persistent,RoleManager,PropertyManager,ObjectManager,Item,Historical,Folder):
""" """
...(etc.)
Every time I try to copy&paste, cut&paste an instance of this product I get
Error Type: AttributeError
Error Value: manage_afterAdd
The traceback is:
Traceback (innermost last):
File /home/medizin/zope/zope-2.5.1/lib/python/ZPublisher/Publish.py, line 150, in publish_module
File /home/medizin/zope/zope-2.5.1/lib/python/ZPublisher/Publish.py, line 114, in publish
File /home/medizin/zope/zope-2.5.1/lib/python/Zope/__init__.py, line 159, in zpublisher_exception_hook
(Object: home2)
File /home/medizin/zope/zope-2.5.1/lib/python/ZPublisher/Publish.py, line 98, in publish
File /home/medizin/zope/zope-2.5.1/lib/python/ZPublisher/mapply.py, line 88, in mapply
(Object: manage_pasteObjects)
File /home/medizin/zope/zope-2.5.1/lib/python/ZPublisher/Publish.py, line 39, in call_object
(Object: manage_pasteObjects)
File /home/medizin/zope/zope-2.5.1/lib/python/OFS/CopySupport.py, line 160, in manage_pasteObjects
(Object: home2)
File /home/medizin/zope/zope-2.5.1/lib/python/OFS/ObjectManager.py, line 267, in _setObject
(Object: home2)
File /home/medizin/zope/zope-2.5.1/lib/python/Products/ZCatalog/CatalogAwareness.py, line 46, in manage_afterAdd
File /home/medizin/zope/zope-2.5.1/lib/python/Products/ZCatalog/CatalogAwareness.py, line 46, in manage_afterAdd
AttributeError: (see above)
I understand that this error has something to do with inheriting from CatalogAware. manage_afterAdd is called after paste so the object can tell its default_catalog about its new path I belive.
Since I don't need manage_afterAdd I tried to overwrite it:
def manage_afterAd():
""" """
pass
But the error persits...
Can anybody tell me how to solve this problem, or point me to some documentation?
Many, many thanks in advance :-)
Greetings
Sven
--
Sven Rudolph, Programmierer
Medical Tribune Verlagsgesellschaft mbH
Unter den Eichen 5, 65195 Wiesbaden
Tel.: 06 11 / 97 46 25 2