Modify

Opened 15 years ago

Closed 14 years ago

Last modified 11 years ago

#5503 closed defect (fixed)

[PATCH] KeyError: 'fields'

Reported by: jens.rantil@… Owned by: Noah Kantrowitz
Priority: normal Component: MasterTicketsPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.11

Description

How to Reproduce

While doing a GET operation on /ticket/2191, Trac issued an internal error.

I wanted to see the diff of a ticket summary change (url=/ticket/2191?action=diff&version=1).

Request parameters:

{'action': u'diff', 'version': u'1', 'id': u'2191'}

System Information

Trac 0.11.1
Python 2.4.4 (#1, Oct 22 2008, 20:17:05)
[GCC 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)]
setuptools 0.6c3
SQLite 3.3.8
pysqlite 2.3.2
Genshi 0.5.1
mod_python 3.2.10
Subversion 1.5.1 (r32289)

Python Traceback

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 208, in dispatch
    template, data, content_type = \
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 299, in _post_process_request
    resp = f.post_process_request(req, *resp)
  File "build/bdist.linux-x86_64/egg/mastertickets/web_ui.py", line 64, in post_process_request
KeyError: 'fields'

Attachments (1)

trac-hacks-5503-patch.diff (851 bytes) - added by Frau Boonekamp 15 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 15 years ago by seltmann@…

same here

Changed 15 years ago by Frau Boonekamp

Attachment: trac-hacks-5503-patch.diff added

comment:2 Changed 15 years ago by Frau Boonekamp

The issue was that when you enter diff mode, the structure of the 'changes' datafield was different (and did not contain the 'fields' sub).

This patch bails out investigating the changes datastructure if we are in diff mode.

comment:3 Changed 15 years ago by Frau Boonekamp

Summary: KeyError: 'fields'[PATCH] KeyError: 'fields'

comment:4 Changed 15 years ago by Ivan

+1 Have the same error with a ticket diff description. The patch fixed this. Thanks! I think the fix should be committed in to the svn.

comment:5 Changed 14 years ago by Frau Boonekamp

Resolution: fixed
Status: newclosed

comment:6 Changed 11 years ago by Ryan J Ollos

(In [12910]) Fix #5503, #6766 and #3920 with the patch from #3920: http://trac-hacks.org/attachment/ticket/3920/fix_ticket_diff.patch

[Patch] Error in code causing diff crash on tickets with changes in description only (web_ui.py)

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Noah Kantrowitz.
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.