Modify

Opened 5 years ago

Closed 4 years ago

Last modified 13 months ago

#5503 closed defect (fixed)

[PATCH] KeyError: 'fields'

Reported by: jens.rantil@… Owned by: coderanger
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 boonekamp 5 years ago.

Download all attachments as: .zip

Change History (7)

comment:1 Changed 5 years ago by seltmann@…

same here

Changed 5 years ago by boonekamp

comment:2 Changed 5 years ago by 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 5 years ago by boonekamp

  • Summary changed from KeyError: 'fields' to [PATCH] KeyError: 'fields'

comment:4 Changed 5 years ago by Drops

+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 4 years ago by boonekamp

  • Resolution set to fixed
  • Status changed from new to closed

comment:6 Changed 13 months ago by rjollos

(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)

Add Comment

Modify Ticket

Action
as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from coderanger. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.