[Zope] bug in catalog?

sean.upton@uniontrib.com sean.upton@uniontrib.com
Thu, 26 Jun 2003 16:58:34 -0700


Are you moving CatalogAware objects and not re-indexing it? What is l=
ikely
happening is that you are moving an object, (perhaps) indexing it at =
its old
location, but not unindexing it from its old location.  This means th=
at the
"brain" object in the catalog exists, but when you call getObject() i=
t
returns None.  This only happens when the catalog cannot traverse to =
an
object at the path referenced in the Catalog.

Sean

> -----Original Message-----
> From: Steffen Hausmann [mailto:steffen@hausmann-family.de]
> Sent: Thursday, June 26, 2003 4:39 PM
> To: zope@zope.org
> Subject: [Zope] bug in catalog?
>=20
>=20
> Hi,
>=20
> 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.
>=20
> I'm using the folloing RewriteRule to which points to the directory
> /brk.=20
>=20
> RewriteRule ^/(.*)=20
> http://127.0.0.1:8070/VirtualHostBase/https/foo.bar:443/brk/Vi
> rtualHostRoot/$1 [L,P]
>=20
> When an item is added it gets indexed to a catalog which is located=
 in
> the folder /brk.
>=20
> self.index_object()
>=20
> This is where the problem occurs. The 'Object Identifier' of the it=
em
> is /edit/Berichtverwaltung/20030626213201.0.875058372091 and not
> /brk/edit/Berichtverwaltung/20030626213201.0.875058372091 as it sho=
uld
> be. The 'path' key and the rest of the variables that get indexed a=
re
> correct.
>=20
> But if I try to access an item with a wrong 'Object Identifier' wit=
h
>=20
> path =3D re.match("(.*)/edit/.+?/.+?",=20
> object.getObject().absolute_url()).groups()[0]
>=20
> an AttributeError is raised.
>=20
> Exception Type  =09AttributeError
> Exception Value =09'None' object has no attribute 'absolute_url'
>=20
> If I delete the wrong entry of the catalog and reindex it with 'Fin=
d
> Object' the 'Object Identifier' has the missing '/brk' and the erro=
r
> doesn't occur.
>=20
> If I update the catalog with 'manage_catalogReindex' while it conta=
ins
> some of the wrong entries they are deleted.
>=20
> Any ideas what is wrong?
>=20
> MfG Steffen
> --=20
> Zu sagen 'Hier herrscht Freiheit' ist immer ein Irrtum oder auch ei=
ne
> L=FCge -- Freiheit herrscht nicht (Erich Fried)
>=20
> _______________________________________________
> Zope maillist  -  Zope@zope.org
> http://mail.zope.org/mailman/listinfo/zope
> **   No cross posts or HTML encoding!  **
> (Related lists -=20
>  http://mail.zope.org/mailman/listinfo/zope-announce
>  http://mail.zope.org/mailman/listinfo/zope-dev )
>=20