[ZCM] [ZC] 1095/ 4 Comment "ZPT error message with leading / in
path"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Sun Oct 26 12:51:48 EST 2003
Issue #1095 Update (Comment) "ZPT error message with leading / in path"
Status Pending, Zope/bug medium
To followup, visit:
http://zope.org/Collectors/Zope/1095
==============================================================
= Comment - Entry #4 by stevea on Oct 26, 2003 12:51 pm
I suggest the specification be amended to make a leading slash equivalent to "CONTEXTS/" at the start of an expression.
The CONTEXTS bound name is used when the name of a "context" such as "root", "here", "request" and so forth has been shadowed by a local definition. This seems to be very similar to an absolute path kind of thing.
________________________________________
= Comment - Entry #3 by ianb on Oct 26, 2003 3:11 am
There's an analogy between URLs and path expressions -- an analogy that was deliberately encouraged by the use of "/". This is a place where that analogy breaks down, even though it would be entirely reasonable if it actually worked (where /something was equivalent to root/something). Where there's a potential inconsistency with reasonable programmer expectations, it's nice to give the programmer a hint of what they did wrong (which the current message does not do).
________________________________________
= Comment - Entry #2 by ajung on Oct 26, 2003 2:57 am
If people would read the existing documentation then they would not
get the idea to try "/template/title". So this is more a RTFM
issue and not a requirement to change the code since path expresssions
are well defined and documented.
________________________________________
= Request - Entry #1 by ianb on Oct 25, 2003 11:34 pm
If you use a path with a leading slash, you get an error like:
TAL.TALDefs.TALError: Invalid variable name "" in expression '/template/title', at line 13, column 7
This is a very confusing error. I would suggest a change in Expressions.py:119, that it test if base is empty, and if so then use a message that warns people that leading slashes are not allowed.
==============================================================
More information about the Zope-Collector-Monitor
mailing list