[Zope] ZCatalog and SiteRoot, best solution

Petter Enholm Petter Enholm" <pe@snapper.no
Sun, 17 Mar 2002 16:26:44 +0100


Hi,

I have several sites running with SiteRoot and of course ZCatalog. When
indexing the ZCatalog for the first time I get paths that resolve to the top
level of the siste. New entires added will only get paths starting from the
current SiteRoot. On servers running version 2.2.4 of Zope I patched the
ZCatalog class according to a HOW-TO on Zope. org, which fixed this problem.

I am now interested in finding a more permanent solution than patching
source files not in my project.

I have seen that there is a method in ZCatalog for normalizing the paths in
ZCatalog. But this will only fix the paths for the objects in the Catalog
when it is being run, not for new objects - or am I completely mistaken
here? Other suggest patching ZCatalog entry in manage_afterAdd.

What is the best practice for handling updates, new objects etc.

Best regards
Petter Enholm