[Zope] Zcatalog confusion
Stuart 'Zen' Bishop
zen@cs.rmit.edu.au
Thu, 7 Oct 1999 11:23:10 +1000 (EST)
On Wed, 6 Oct 1999, Geir B Hansen wrote:
> > > manage_editCataloger('newscatalog')
>
> >From what i gather, you have to put the <dtml-call
> "manage_editCataloger('newsCatalog')"> in your zclass_add , not your
> zclass_addForm.
>
> I do not know where to go from there, though , because i still get an
> error :
>
> Error Type: TypeError
> Error Value: not enough arguments; expected 3, got 2
I got stuck at the same point, but am getting a different error. I'm
making the call from inside the <dtml-with
"WFMContainerClass.createInObjectManager(REQUEST['id'], REQUEST)"> section,
which I gather means I'm working with the newly created ZClass instance.
<dtml-call "manage_editCataloger('mycatalog')> gives me the following:
Error Type: NameError
Error Value: REQUEST
Traceback (innermost last):
File /www/zope/2.0.1/lib/python/ZPublisher/Publish.py, line 214, in publish_module
File /www/zope/2.0.1/lib/python/ZPublisher/Publish.py, line 179, in publish
File /www/zope/2.0.1/lib/python/Zope/__init__.py, line 201, in zpublisher_exception_hook
(Object: RoleManager)
File /www/zope/2.0.1/lib/python/ZPublisher/Publish.py, line 165, in publish
File /www/zope/2.0.1/lib/python/ZPublisher/mapply.py, line 160, in mapply
(Object: WFMContainerClass_add)
File /www/zope/2.0.1/lib/python/ZPublisher/Publish.py, line 102, in call_object
(Object: WFMContainerClass_add)
File /www/zope/2.0.1/lib/python/OFS/DTMLMethod.py, line 145, in __call__
(Object: WFMContainerClass_add)
File /www/zope/2.0.1/lib/python/DocumentTemplate/DT_String.py, line 502, in __call__
(Object: WFMContainerClass_add)
File /www/zope/2.0.1/lib/python/DocumentTemplate/DT_With.py, line 148, in render
(Object: WFMContainerClass.createInObjectManager(REQUEST['id'], REQUEST))
File /www/zope/2.0.1/lib/python/DocumentTemplate/DT_Util.py, line 321, in eval
(Object: manage_editCataloger('WFMCatalog'))
File <string>, line 0, in ?
File /www/zope/2.0.1/lib/python/Products/ZCatalog/CatalogAwareness.py, line 109, in manage_editCataloger
(Object: CatalogAware)
NameError: (see above)
I've also tried the following syntaxes for a laugh:
<dtml-call "manage_editCataloger('mycatalog',REQUEST)">
This gives me the same error message you cited.
I'm left with the impression that there is a bug in manage_editCataloger
then, but can't be 100% sure. I'd love to know if DTML is magically
adding the REQUEST parameter to my method call, but havn't yet waded
through the source that far.
___
// Zen (alias Stuart Bishop) Work: zen@cs.rmit.edu.au
// E N Senior Systems Alchemist Play: zen@shangri-la.dropbear.id.au
//__ Computer Science, RMIT WWW: http://www.cs.rmit.edu.au/~zen