On Sep 30, 2005, at 11:31 PM, Alen Stanisic wrote:

Not sure if it will help but whenever I had to look up a catalog I would only do zapi.getUtility(ICatalog) and I noticed you are also providing a
name and context.

Yeah, with or without the extra parameters, it always only returns the root catalog instance.

I also believe that if you are looking up a catalog by name as you seem
to be doing it is not enought for the catalog object to be named
accumac_catalog but you also have to register it as the name ('Register
As' field in New Utility Registration) during catalog creation.  I
usually leave 'Register As' blank as I only ever needed to get catalog
by ICatalog interface only -> zapi.getUtility(ICatalog)

When I created it, I set "register as" to "accumac_catalog". Based on the experience you shared, I deleted my catalog and did not give it a name upon creation. zapi.getUtility(ICatalog) now works, as it gets the "sub-site's" catalog in the accumac/++etc++site/default directory.

Very strange. If I understood this more, or if there was expert-aided interest, I would troubleshoot this. It may not be a bug, but there at least seem to be issues of an anti-intuitive nature here...

Alen, thanks again for your assistance in this matter :-)


Zope3-users mailing list

Reply via email to