ZCatalog and SiteRoot, best solution
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
I am answering my self here as I found the solution - and ... I also see that this msg should have been posted to Zope-dev. Anyway, here goes: Developing Products dependant upon both SiteRoot and ZCatalog requires that you use Products.ZCatalog.CatalogPathAwareness as mix-in class and not CatalogAwareness. CatalogPathAwareness will always give you the absolute path to an object, not a relative one adjusted for the site root. Best regards Petter Enholm ----- Original Message ----- From: "Petter Enholm" <pe@snapper.no> To: "Zope user list" <zope@zope.org> Sent: Sunday, March 17, 2002 4:26 PM Subject: [Zope] ZCatalog and SiteRoot, best solution
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.
What is the best practice for handling updates, new objects etc.
participants (1)
-
Petter Enholm