I have a Zcatalog called newscatalog in my news-folder to index my news (Zclass). The newsdocs are catalog-aware, and i use reindex-object in the function that makes and modifies them. Still, they do not get cataloged.. Not even when i use the 'update catalog'-button in the catalog management.. - i have to go through the whole 'add items to zcatalog' routine to make my new instances show up in the catalog... Does this have anything to do with my catlog not being in the root folder ??
At 14:32 05/10/99 , Geir B Hansen wrote:
I have a Zcatalog called newscatalog in my news-folder to index my news (Zclass). The newsdocs are catalog-aware, and i use reindex-object in the function that makes and modifies them.
Still, they do not get cataloged.. Not even when i use the 'update catalog'-button in the catalog management.. - i have to go through the whole 'add items to zcatalog' routine to make my new instances show up in the catalog...
Does this have anything to do with my catlog not being in the root folder ??
No, it probably has to do that by default, CatalogAware objects try and catalog themselves in a ZCatalog with id 'Catalog'. You will have to change the default_catalog attribute of your ZClass when creating them, by calling manage_editCataloger: manage_editCataloger('newscatalog') -- Martijn Pieters, Web Developer | Antraciet http://www.antraciet.nl | Tel: +31-35-7502100 Fax: +31-35-7502111 | mailto:mj@antraciet.nl http://www.antraciet.nl/~mj | PGP: http://wwwkeys.nl.pgp.net:11371/pks/lookup?op=get&search=0xA8A32149 ------------------------------------------
No, it probably has to do that by default, CatalogAware objects try and catalog themselves in a ZCatalog with id 'Catalog'. You will have to change the default_catalog attribute of your ZClass when creating them, by calling manage_editCataloger:
manage_editCataloger('newscatalog')
i got a similar setup, and lo and behold, object are not updated when added automatically. only using the find interface can the object be updated. can i use the above solution also? tried putting it in my zclass _add form (<dtml-call "propertysheets.Article.manage_editCataloger('newsCatalog')"> ), but got an error. also put in <dtml-call reindex_object>. note:however, the catalog at the root dir got updated, but i can't get some meta_type that i wanted that i can get in the catalog instance in my zclass folder. tia.
manage_editCataloger('newscatalog')
i got a similar setup, and lo and behold, object are not updated when added automatically. only using the find interface can the object be updated.
can i use the above solution also? tried putting it in my zclass _add form (<dtml-call "propertysheets.Article.manage_editCataloger('newsCatalog')"> ), but got an error. also put in <dtml-call reindex_object>. note:however, the catalog at the root dir got updated, but i can't get some meta_type that i wanted that i can get in the catalog instance in my zclass folder.
tia.
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 ------------------------------------------------ Geir B Hansen geirh@funcom.com Web-designer / Graphic artist Funcom Oslo ------------------------------------------------
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
participants (4)
-
Geir B Hansen -
kedai -
Martijn Pieters -
Stuart 'Zen' Bishop