access to selection / multiple selection properties in DTML Methods
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zope 2 |
Won't Fix
|
Medium
|
Unassigned |
Bug Description
- add a lines property named 'ref_' to a folder and fill in some values.
- copy the contents of lib/python/
- create a subfolder in the folder
- add a selection or multiple selection property to the subfolder, with the lines property 'ref_' from the parent folder as the "choice values".
- call the method 'proptest' on the subfolder. Instead of showing the [multiple] selection, the output will be "no value for ref_".
While the regular properties tab of the ZMI works fine, the property 'ref_' of the parent folder cannot be accessed from the DTML Method with the same source code.
Some more details:
- If something like '<dtml-var ref_>' is inserted near the start of the DTML Method proptest, the [multi] selection property will be shown correctly.
- If line 130 of the 'proptest':
> <dtml-elif "_.has_
> <div class="
> <select name="<dtml-var id>:utf8:list" multiple
> size="<dtml-var "_.min(7, _.len(_
> <dtml-in "_[select_
> <option<dtml-if
> "getProperty(id) and (_['sequence-item'] in getProperty(id))"
> > SELECTED</dtml-if
> >><dtml-var sequence-item html_quote>
> </dtml-in>
> </select>
> </div>
> <dtml-else>
is changed to
> <dtml-elif "1 or _.has_key(
> ...
Zope raises an "unauthorized" error.
- As a workaround, it is possible to change lines 100 and 130 to
> <dtml-elif "_.has_
select_variable is of type ustring, and for whichever reason access to things like _[select_variable] seems to be denied, while access to _[_.str(
This sounds like an overcomplicated mix of DTML and the ticket has seen no interest in years. I'd call this a wontfix.