[Zope-CMF] VHM and portal_catalog

Tres Seaver tseaver@zope.com
Mon, 25 Feb 2002 08:05:54 -0500 (EST)


On Mon, 25 Feb 2002, Magnus Heino wrote:

> 
> Hi.
> 
> I have a CMF site at /Golf in Zope, that is rewritten using Virtual Host
> Manager.
> 
> VHM mapps golf.alvkarleby.net to golf.alvkarleby.net:8080/Golf
> 
> Everything works, but ZCatalog searches.
> 
> This fails:
> 
> http://golf.alvkarleby.net/search?start:list:date=2002-04-03%2000%3A00%3A00&
> amp;start:list:date=2002-04-03%2023%3A59%3A59&start_usage=range:min:max
> 
> and this works:
> 
> http://golf.alvkarleby.net:8080/Golf/search?start:list:date=2002-04-03%2000%
> 3A00%3A00&start:list:date=2002-04-03%2023%3A59%3A59&start_usage=rang
> e:min:max
> 
> A path in ZCatalog looks like this;
> 
> path  /Golf/Members/kansli/Bilder/Blandat/klubbhus.jpg
> 
> I guess that is part of the problem?

Nope, this is by design;  the catalog stores the physical path
to the object on purpose.

> What is the right way to solve this?

It sounds like either you have a fairly old version of the
CMF, or that you have customized the search template.  The
HREF of the anchor tag should use 'obj.getURL()', rather than
'obj.getPath()', in order to do the Right Thing (TM) whether
in the presence of virtual or not.
 
Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.org