[ZCM] [ZC] 1845/ 4 Edit "ACTUAL_URL is not actual URL ;)"

Collector: Zope Bugs, Features, and Patches ... zope-coders-admin at zope.org
Mon Jul 18 11:13:27 EDT 2005


Issue #1845 Update (Edit) "ACTUAL_URL is not actual URL ;)"
 Status Pending, Zope/bug medium
To followup, visit:
  http://www.zope.org/Collectors/Zope/1845

==============================================================
= Edit - Entry #4 by yuppie on Jul 18, 2005 11:13 am

 Changes: submitter email, edited transcript, new comment

fixed my last comment: should be ACTUAL_URL, not VIRTUAL_URL
________________________________________
= Comment - Entry #3 by yuppie on Jul 18, 2005 10:48 am

Before we add yet another variable, could you please test if this code has the desired behavior:

  <a tal:define="actual_query python:request['QUERY_STRING'] and '?'+request['QUERY_STRING'] or ''"
     tal:attributes="href string:${request/ACTUAL_URL}${actual_query}#someContent"
  > Skip to content</a>

'URL' variables in REQUEST never include the query string, so I'm not sure if it is a good idea to change ACTUAL_URL. Changing its behavior might also break existing code.
________________________________________
= Comment - Entry #2 by ajung on Jul 18, 2005 1:37 am

Patches are welcome :-)
________________________________________
= Request - Entry #1 by limi on Jul 17, 2005 11:45 pm

This is a follow-up to http://www.zope.org/Collectors/Zope/1568

The new ACTUAL_URL variable is 95% there, but doesn't include the query string of the URL, which it has to do to solve the use case for why ACTUAL_URL was invented in the first place: HTML anchors.

Please do not invent yet another variable for this, but add the query string to ACTUAL_URL. The other variations needed can be constructed from the existing elements, this is a convenience method for developers who need to render the URL currently shown in the URL bar.

(And if you *do* invent another variable, please make ACTUAL_URL include the query string and find another name for the one without the query string. ;)
==============================================================



More information about the Zope-Collector-Monitor mailing list