AttributeError when adding Product.
Greetings, I have a Product called Project that has one ZClass, also called Project. When i am in /Control_Panel/Products/Project and select Project_addForm and then View, i can enter a Project ID and then submit, and a Project instance gets created in that folder. However, anytime i try to add a Project Product using the Add... drop down, i get an error: Error Type: AttributeError Error Value: createInObjectManager The error is below. Any thoughts? Thanks, mark Traceback (innermost last): File /zz/RPMS/zope/Zope-2.4.3-linux2-x86/lib/python/ZPublisher/Publish.py, line 223, in publish_module File /zz/RPMS/zope/Zope-2.4.3-linux2-x86/lib/python/ZPublisher/Publish.py, line 187, in publish File /zz/RPMS/zope/Zope-2.4.3-linux2-x86/lib/python/Zope/__init__.py, line 226, in zpublisher_exception_hook (Object: Project_factory) File /zz/RPMS/zope/Zope-2.4.3-linux2-x86/lib/python/ZPublisher/Publish.py, line 171, in publish File /zz/RPMS/zope/Zope-2.4.3-linux2-x86/lib/python/ZPublisher/mapply.py, line 160, in mapply (Object: Project_add) File /zz/RPMS/zope/Zope-2.4.3-linux2-x86/lib/python/ZPublisher/Publish.py, line 112, in call_object (Object: Project_add) File /zz/RPMS/zope/Zope-2.4.3-linux2-x86/lib/python/OFS/DTMLMethod.py, line 199, in __call__ (Object: Project_add) File /zz/RPMS/zope/Zope-2.4.3-linux2-x86/lib/python/DocumentTemplate/DT_String.py , line 546, in __call__ (Object: Project_add) File /zz/RPMS/zope/Zope-2.4.3-linux2-x86/lib/python/DocumentTemplate/DT_With.py, line 133, in render (Object: Project.createInObjectManager(REQUEST['id'], REQUEST)) File /zz/RPMS/zope/Zope-2.4.3-linux2-x86/lib/python/DocumentTemplate/DT_Util.py, line 231, in eval (Object: Project.createInObjectManager(REQUEST['id'], REQUEST)) (Info: REQUEST) File <string>, line 2, in f (Object: guarded_getitem) File /zz/RPMS/zope/Zope-2.4.3-linux2-x86/lib/python/AccessControl/DTML.py, line 101, in guarded_getattr (Object: Project_add) File /zz/RPMS/zope/Zope-2.4.3-linux2-x86/lib/python/AccessControl/ZopeGuards.py, line 109, in guarded_getattr (Object: Project) AttributeError: (see above)
Mark Lilly writes:
I have a Product called Project that has one ZClass, also called Project.
When i am in /Control_Panel/Products/Project and select Project_addForm and then View, i can enter a Project ID and then submit, and a Project instance gets created in that folder. However, anytime i try to add a Project Product using the Add... drop down, i get an error: Error Type: AttributeError Error Value: createInObjectManager The error indicates that the wrong "Project" object (the product rather than the ZClass) is used. The easiest way is to avoid the name conflict (by renaming your product).
If you do not want that, you may try "Project.Project.createInObjectManager". However, I am not sure, that it will work. Dieter
participants (2)
-
Dieter Maurer -
Mark Lilly