[ZCM] [ZC] 1095/ 3 Comment "ZPT error message with leading / in
path"
Collector: Zope Bugs, Features,
and Patches ...
zope-coders-admin at zope.org
Sun Oct 26 03:11:54 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 #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