[Zope] CatalogAwareness is broken on 2.2

Lalo Martins lalo@hackandroll.org
Mon, 18 Sep 2000 23:26:31 -0300


--4Ckj6UjgE2iN1+kY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

On Mon, Sep 18, 2000 at 10:47:35PM -0300, Lalo Martins wrote:
> CatalogAwareness in 2.2.x doesn't follow the new ZCatalog
> traversal standard - it uses absolute_url() to get the url it
> will give to the ZCatalog, and ZCatalog now wants an absolute
> (non-virtual) path. In practice, this means CatalogAware stuff
> won't work in conjunction with SiteAccess-based virtual
> hosting.

Just occurred to me to check the Collector; this is bug 1580
there. I sent a one-line patch (which will appear as 1629 if I
did everything right); I don't know if it's 100% right, but it
Works For Me (TM) ;-)

[]s,
                                               |alo
                                               +----
--
          Hack and Roll  ( http://www.hackandroll.org )
            News for, uh, whatever it is that we are.


http://zope.gf.com.br/lalo           mailto:lalo@hackandroll.org
         pgp key: http://zope.gf.com.br/lalo/pessoal/pgp

Brazil of Darkness (RPG)    ---     http://zope.gf.com.br/BroDar

--4Ckj6UjgE2iN1+kY
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="CatalogAwareness-for-2.2.diff"

--- Products/ZCatalog/CatalogAwareness.py.orig	Thu Aug 24 11:09:21 2000
+++ Products/ZCatalog/CatalogAwareness.py	Mon Sep 18 23:07:18 2000
@@ -154,7 +154,7 @@
         if hasattr(self, 'DestinationURL') and \
            callable(self.DestinationURL):
             url='%s/%s' % (self.DestinationURL(), self.id)
-        else: url=self.absolute_url()
+        else: url=string.join(self.getPhysicalPath(), '/')
         type, uri=ftype(url)
         host, uri=fhost(uri)
         script_name=self.REQUEST['SCRIPT_NAME']

--4Ckj6UjgE2iN1+kY--