[ZCM] [ZC] 1568/ 1 Request "VIRTUAL_URL only available if VHM is used"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Tue Nov 9 10:01:10 EST 2004


Issue #1568 Update (Request) "VIRTUAL_URL only available if VHM is used"
 Status Pending, Zope/bug medium
To followup, visit:
  http://collector.zope.org/Zope/1568

==============================================================
= Request - Entry #1 by limi on Nov 9, 2004 10:01 am

Sorry for entering this as a new bug, bug the Collector doesn't allow me to re-open http://collector.zope.org/Zope/1252

The short summary is that there's no good way of getting the URL of the current page (ie. what it actually says in the URL field) as opposed to what Zope reports as the object URL.

This was supposed to be fixed with the introduction of VIRTUAL_URL (which is a sily name, I agree) - the problem is that this has no fallback value when VirtualHostMonster isn't being used in a site - which makes it impossible to rely on this in product code - which kind of negates the whole idea of having it there.

Would it be possible to let Zope return a sane value instead of causing a traceback when there is no VHM present?

Sorry to be so persistent about this, but it's one of the things that truly suck as a newbie developer with Zope and Plone - the fact that getting the *current URL you're at* is almost impossible. I do not think this code to create a simple anchor (#) that always works is obvious to people:

<a tal:define="url request/VIRTUAL_URL|string:${request/SERVER_URL}${request/PATH_TRANSLATED}"  tal:attributes="href string:${url}#someContent">
 Skip to content
</a>

==============================================================



More information about the Zope-Collector-Monitor mailing list