[Zope3-dev] "base href" generation is wrong ?

Christophe Combelles ccomb at free.fr
Sat Jun 23 06:28:58 EDT 2007


Christophe Combelles a écrit :
> Hello,
> 
> I'm trying to see an custom image object with a custom @@index.html
> The url of the object is /container/image.jpeg
> There is some explanation of base href usage in 
> zope/app/file/browser/url.txt
> 
> * If I visit /container/image.jpeg, I get no base href,
> and the edit link in my menu appears as /container/@@edit.html
> 
> * If I visit /container/image.jpeg/, I get the following base href :
> <base href="..../container/image.jpeg">
> But this has no effect on the relative links in the page, and
> the edit menu link still appears as: /container/@@edit.html
> instead of /container/image.jpeg/@@edit.html
> 
> 
> I've tried to add a slash in zope/publisher/browser.py:713,
> so that the generated base href is:
> <base href="..../container/image.jpeg/">
> 
> 
> And now the relative links are ok.
> 
> Am I wrong or should it be fixed?

It seems the problem comes from somewhere else.
I'm visiting  container/image.jpeg or container/image.jpeg/
and the request/getURL returns container/image.jpeg
instead of container/image.jpeg/@@index.html



More information about the Zope3-dev mailing list