Issue 1982481
Created on 2008-06-02 18:22 by stefan, last changed 2008-08-07 05:58 by richard.
File name |
Uploaded |
Description |
Edit |
Remove |
form_parser.py.diff
|
stefan,
2008-06-02 18:22
|
the obvious fix... |
|
|
msg2929 |
Author: [hidden] (stefan) |
Date: 2008-06-02 18:22 |
|
Roundup form-processing allows you to create a new item by giving it a
negative ID. For example:
<textarea name="msg-2@content" rows="6" cols="81"
wrap="soft" class="sourcerous"></textarea>
<input type="hidden" name="@link@comments" value="msg-2" />
<input type="submit" value="Submit Changes" />
The "msg-2@content" bit says that the value of that <textarea> is the
content of a new msg. (The first new msg is msg-1, the second is
msg-2, etc.)
Except that Roundup's form-processing logic incorrectly looks for "-1"
in some places. It uses "startswith('-1')" in most places, e.g.:
elif nodeid and not nodeid.startswith('-'):
existing = cl.get(nodeid, propname, [])
but not in the place I found below.
This used to work with 1.3.3 because the EditItemAction class had some
compensating logic. That went away, but the form-parsing issue was
not fixed.
|
msg2930 |
Author: [hidden] (richard) |
Date: 2008-08-07 05:58 |
|
Applied with changes (handle id is None and fix incorrect unit test)
|
|
Date |
User |
Action |
Args |
2008-06-02 18:22:38 | stefan | create | |
|