Hi, I'm having a problem with the zope catalog in combination with an apache rewrite rule and I think that it is a bug of the catalog. I'm using the folloing RewriteRule to which points to the directory /brk. RewriteRule ^/(.*) http://127.0.0.1:8070/VirtualHostBase/https/foo.bar:443/brk/VirtualHostRoot/... [L,P] When an item is added it gets indexed to a catalog which is located in the folder /brk. self.index_object() This is where the problem occurs. The 'Object Identifier' of the item is /edit/Berichtverwaltung/20030626213201.0.875058372091 and not /brk/edit/Berichtverwaltung/20030626213201.0.875058372091 as it should be. The 'path' key and the rest of the variables that get indexed are correct. But if I try to access an item with a wrong 'Object Identifier' with path = re.match("(.*)/edit/.+?/.+?", object.getObject().absolute_url()).groups()[0] an AttributeError is raised. Exception Type AttributeError Exception Value 'None' object has no attribute 'absolute_url' If I delete the wrong entry of the catalog and reindex it with 'Find Object' the 'Object Identifier' has the missing '/brk' and the error doesn't occur. If I update the catalog with 'manage_catalogReindex' while it contains some of the wrong entries they are deleted. Any ideas what is wrong? MfG Steffen -- Zu sagen 'Hier herrscht Freiheit' ist immer ein Irrtum oder auch eine Lüge -- Freiheit herrscht nicht (Erich Fried)
Steffen Hausmann wrote at 2003-6-27 01:38 +0200:
I'm having a problem with the zope catalog in combination with an apache rewrite rule and I think that it is a bug of the catalog. ... When an item is added it gets indexed to a catalog which is located in the folder /brk.
self.index_object()
This is where the problem occurs. The 'Object Identifier' of the item is /edit/Berichtverwaltung/20030626213201.0.875058372091 and not /brk/edit/Berichtverwaltung/20030626213201.0.875058372091 as it should be. The 'path' key and the rest of the variables that get indexed are correct.
Modern ZCatalog versions use "getPhysicalPath" as default object id. There is one known whole: "CatalogAware" still uses the old method based on "absolute_url". Use "CatalogPathAware" instead. Dieter
On Fri, Jun 27, 2003 at 08:00:59PM +0200, Dieter Maurer wrote:
Steffen Hausmann wrote at 2003-6-27 01:38 +0200:
I'm having a problem with the zope catalog in combination with an apache rewrite rule and I think that it is a bug of the catalog. ... When an item is added it gets indexed to a catalog which is located in the folder /brk.
self.index_object()
This is where the problem occurs. The 'Object Identifier' of the item is /edit/Berichtverwaltung/20030626213201.0.875058372091 and not /brk/edit/Berichtverwaltung/20030626213201.0.875058372091 as it should be. The 'path' key and the rest of the variables that get indexed are correct.
Modern ZCatalog versions use "getPhysicalPath" as default object id. There is one known whole: "CatalogAware" still uses the old method based on "absolute_url". Use "CatalogPathAware" instead.
That's it. Thank you very much. MfG Steffen -- Zu sagen 'Hier herrscht Freiheit' ist immer ein Irrtum oder auch eine Lüge -- Freiheit herrscht nicht (Erich Fried)
participants (2)
-
Dieter Maurer -
Steffen Hausmann