Opened 5 years ago

Last modified 2 years ago

#8981 assigned defect

Editing fails with "KeyError: 'id'"

Reported by: rrossmair Owned by: hasienda
Priority: normal Component: DiscussionPlugin
Severity: normal Keywords:
Cc: rjollos Trac Release: 0.12


'Submit changes' fails and produces the following log entry:

2011-07-13 11:08:40,587 Trac[main] ERROR: Internal Server Error:.
Traceback (most recent call last):
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.3dev_r10746-py2.6.egg/trac/web/", line 522, in _dispatch_request
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.3dev_r10746-py2.6.egg/trac/web/", line 243, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/local/lib/python2.6/dist-packages/TracDiscussion-0.8_r9877-py2.6.egg/tracdiscussion/", line 112, in process_request
    template, data = api.process_discussion(context)
  File "/usr/local/lib/python2.6/dist-packages/TracDiscussion-0.8_r9877-py2.6.egg/tracdiscussion/", line 259, in process_discussion
    self._do_actions(context, actions)
  File "/usr/local/lib/python2.6/dist-packages/TracDiscussion-0.8_r9877-py2.6.egg/tracdiscussion/", line 1098, in _do_actions
    listener.topic_changed(context, topic, context.topic)
  File "/usr/local/lib/python2.6/dist-packages/TracDiscussion-0.8_r9877-py2.6.egg/tracdiscussion/", line 91, in topic_changed
KeyError: 'id'

Trac Version is 0.12.3dev-r10746
Discussion Plugin Version: 0.8-r9877

Attachments (0)

Change History (5)

comment:1 Changed 5 years ago by Blackhex

  • Priority changed from high to normal
  • Status changed from new to assigned

Current revision is in unfinished state. Read Plugin Versions section at DiscussionPlugin page.

comment:2 Changed 5 years ago by rjollos

#9528 was closed as a duplicate.

comment:3 Changed 2 years ago by hasienda

In 13939:

DiscussionPlugin: Change listeners got incomplete objects, refs #6783 and #8981.

Fixed tag-related change listeners to get discussion item IDs, what caused
KeyErrors before, just raised a couple of other issues. Not all of these
issues are resolved yet. I decided to initially catch listener errors with
logged warnings for improved API method robustness.

Moved time stamp generation nearer to db action and letting _add_item()
return the added item ID obsoleted four api methods at once.

comment:4 Changed 2 years ago by hasienda

  • Owner changed from Blackhex to hasienda

comment:5 Changed 2 years ago by hasienda

  • Cc rjollos added; anonymous removed

As hinted in the commit message fixing tag-related change listeners uncovered more work to be done to make change listener calls conform to method descriptions in interface definitions. I'll continue to push related change for a complete solution.

Add Comment

Modify Ticket

as assigned The owner will remain hasienda.

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.