[Zope] problem with catalog and VHM

dieter@handshake.de dieter@handshake.de
Thu, 3 Apr 2003 20:14:28 +0200


Steffen Hausmann wrote at 2003-4-2 22:25 +0200:
 > ....
 > > Thus, pass in a real "REQUEST" rather than "None".
 > > You can use "self.REQUEST".
 >=20
 > That works, but there is another Problem, with another function.
 >=20
 > getItem(self, metaType, verband, REQUEST=3DNone):
 >         for object in self.brkCatalog({'meta_type':metaType}):
 >                 path =3D re.match("(.*)/edit/.+?/.+?", object.getObjec=
t().absolute_url())
 >=20
 > The request that is passed to the funktion by a dtml-in call looks ok
 > (it is not None), but another AttributeError occurs.
 >=20
 > AttributeError: 'None' object has no attribute 'absolute_url'

Apparently, "getObject()" returned "None".

Call "getPath()" instead and see what is strange with the path.

If "getPath()" returns None, too, then you have a catalog inconsistency.
If you get a true path, you can try to find out why
"unrestrictedTraverse" is unable to resolve it into an object.

 > ...
 > This does also work with the old RewriteRule.

"CatalogAware" (rather than "CatalogPathAware") is known to have
issues with virtual hosting. Maybe, this lies behind your problem.


Viele Gr=FC=DFe
Dieter