Modify ↓
Opened 16 years ago
Closed 16 years ago
#3326 closed defect (fixed)
ERROR: field %r has too many values'
Reported by: | Owned by: | Rich Harkins | |
---|---|---|---|
Priority: | high | Component: | TracFormsPlugin |
Severity: | major | Keywords: | |
Cc: | rich@… | Trac Release: | 0.11 |
Description
I did use this small form
# # # #! subcontext systems #! submit_label "Update systems" #! track_fields ||'''No'''||'''what'''||'''description'''||'''comment'''||'''Who'''||'''When'''|||| ||1||naming computer||sticker for the device and a name for the domain||[tf.textarea:name "hans"]||[tf.who:name]||[tf.when:name]||[tf:name]||
after a update not always round about all second update I get this error
Traceback (most recent call last): File "build\bdist.win32\egg\tracforms\macros.py", line 354, in process return str(fn(*args, **kw)) File "build\bdist.win32\egg\tracforms\macros.py", line 425, in op_textarea current = self.get_field(field) File "build\bdist.win32\egg\tracforms\macros.py", line 372, in get_field return 'ERROR: field %r has too many values' % str(field) NameError: global name 'field' is not defined
The log file has no entry.
Attachments (0)
Change History (6)
comment:1 Changed 16 years ago by
Cc: | rich@… added; anonymous removed |
---|---|
Owner: | changed from Rich Harkins to anonymous |
Status: | new → assigned |
comment:2 Changed 16 years ago by
Owner: | changed from anonymous to Rich Harkins |
---|---|
Status: | assigned → new |
comment:3 Changed 16 years ago by
Status: | new → assigned |
---|
comment:4 Changed 16 years ago by
Priority: | normal → high |
---|---|
Severity: | normal → major |
comment:5 Changed 16 years ago by
Ok. I changed to r3946 and I will use to different names for textarea and input.
didley
comment:6 Changed 16 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Note: See
TracTickets for help on using
tickets.
The good news: I just committed r3946, which has a fix for this in the branches/release-0.2 area. I'll merge this change up into trunk next week, but you can get it now if you like.
The bad news: That is happening because there are two fields with the same effective name (which is coincidentally named "name" in the example) which is going to cause a different, albeit proper, error once you update.
The form would need to change a little -- [tf.textarea:name "hans"] needs to differ from [tf:name] (a checkbox) since they are different fields. Perhaps [tf.textarea:name_string "hans"] might work. The thing is that there are two different fields being stored here -- one is a textarea and the other a checkbox.
The tricky question is whether the form intends to see the [tf.who:name] from the checkbox or the textarea...