Modify

Opened 13 years ago

Closed 8 years ago

#8981 closed defect (fixed)

Editing fails with "KeyError: 'id'"

Reported by: Robert Rossmair Owned by:
Priority: normal Component: DiscussionPlugin
Severity: normal Keywords:
Cc: Ryan J Ollos Trac Release: 0.12

Description

'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/main.py", line 522, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/local/lib/python2.6/dist-packages/Trac-0.12.3dev_r10746-py2.6.egg/trac/web/main.py", 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/core.py", 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/api.py", 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/api.py", 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/tags.py", line 91, in topic_changed
    topic['id']))
KeyError: 'id'

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

Attachments (0)

Change History (8)

comment:1 Changed 13 years ago by Radek Bartoň

Priority: highnormal
Status: newassigned

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

comment:2 Changed 13 years ago by Ryan J Ollos

#9528 was closed as a duplicate.

comment:3 Changed 11 years ago by Steffen Hoffmann

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 11 years ago by Steffen Hoffmann

Owner: changed from Radek Bartoň to Steffen Hoffmann

comment:5 Changed 11 years ago by Steffen Hoffmann

Cc: Ryan J Ollos 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.

comment:6 Changed 8 years ago by Ryan J Ollos

Status: assignednew

comment:7 Changed 8 years ago by Ryan J Ollos

Owner: Steffen Hoffmann deleted

comment:8 Changed 8 years ago by Ryan J Ollos

Resolution: fixed
Status: newclosed

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The ticket will remain with no owner.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.