Ticket #3326 (closed defect: fixed)

Opened 5 months ago

Last modified 5 months ago

ERROR: field %r has too many values'

Reported by: didley@gmx.de Assigned to: rharkins
Priority: high Component: TracFormsPlugin
Severity: major Keywords:
Cc: rich@worldsinfinite.com 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

Change History

07/03/08 16:14:12 changed by anonymous

  • cc set to rich@worldsinfinite.com.
  • owner changed from rharkins to anonymous.
  • status changed from new to assigned.

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...

07/03/08 16:15:55 changed by rharkins

  • owner changed from anonymous to rharkins.
  • status changed from assigned to new.

07/03/08 16:16:11 changed by rharkins

  • status changed from new to assigned.

07/03/08 16:39:00 changed by rharkins

  • priority changed from normal to high.
  • severity changed from normal to major.

07/04/08 05:32:12 changed by didley@gmx.de

Ok. I changed to r3946 and I will use to different names for textarea and input.

didley

07/05/08 13:47:59 changed by rharkins

  • status changed from assigned to closed.
  • resolution set to fixed.

Add/Change #3326 (ERROR: field %r has too many values')




Change Properties
Action