Edgewall Software
Modify

Opened 16 years ago

Closed 15 years ago

Last modified 21 months ago

#6975 closed defect (fixed)

error on adding comment to ticket

Reported by: gimre@… Owned by: Christian Boos
Priority: normal Milestone: 0.11.5
Component: ticket system Version: 0.10.4
Severity: normal Keywords: verify
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description

I'm helping the guys over at lighttpd to debug something, and i'm updating one of the tickets i opened (without logging in, i only provided the email address), and when i'm trying to add a new comment, i get the following error:

"Trac detected an internal error:"

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 408, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 239, in dispatch
    resp = chosen_handler.process_request(req)
  File "/usr/lib/python2.4/site-packages/trac/ticket/web_ui.py", line 290, in process_request
    self._do_save(req, db, ticket)
  File "/usr/lib/python2.4/site-packages/trac/ticket/web_ui.py", line 557, in _do_save
    cnum=internal_cnum):
  File "/usr/lib/python2.4/site-packages/trac/ticket/model.py", line 262, in save_changes
    listener.ticket_changed(self, comment, author, old_values)
  File "build/bdist.linux-i686/egg/removepending/remove_pending.py", line 27, in ticket_changed
  File "/usr/lib/python2.4/site-packages/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/usr/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 56, in execute
    args or [])
  File "/usr/lib/python2.4/site-packages/trac/db/sqlite_backend.py", line 48, in _rollback_on_error
    return function(self, *args, **kwargs)
IntegrityError: columns ticket, time, field are not unique

The ticket was last updated more than 24 hours ago, now i just want to add my own comment again, and it won't let me. You can check it out at http://trac.lighttpd.net/trac/ticket/1583 .

I have the 'Need feedback' option checked too, to receive changes in mail when the ticket changes. Sometimes it works as you can see, because i managed to submit other comments, but this is the second time this error happens. The first time i think i just left the email field as 'anonymous', and that way my comment was added.

Attachments (0)

Change History (6)

comment:1 by Christian Boos, 16 years ago

Resolution: wontfix
Status: newclosed

No idea what that plugin is (removepending/remove_pending.py), but the problem comes from there. You should notify the Lighttpd admins, which should know what that plugin is, and they have to report the issue to the plugin maintainer.

In the future, plugin failure will be much easier to deal with (#5516).

comment:2 by olaf.meeuwissen@…, 15 years ago

I've observed the same problem here, running 0.11.1 via WSGI, but without any mention of non-core stuff in the traceback. The interesting thing was that it only happened in some of our Trac environments.

Trying to modify any of a ticket's text fields resulted in:

Traceback (most recent call last):
  File "/opt/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 423, in _dispatch_request
    dispatcher.dispatch(req)
  File "/opt/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/web/main.py", line 197, in dispatch
    resp = chosen_handler.process_request(req)
  File "/opt/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 170, in process_request
    return self._process_ticket_request(req)
  File "/opt/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 494, in _process_ticket_request
    self._do_save(req, ticket, action)
  File "/opt/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/web_ui.py", line 989, in _do_save
    cnum=internal_cnum):
  File "/opt/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/ticket/model.py", line 270, in save_changes
    (self.id, when_ts, author, cnum, comment))
  File "/opt/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/db/util.py", line 50, in execute
    return self.cursor.execute(sql_escape_percent(sql), args)
  File "/opt/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/db/sqlite_backend.py", line 58, in execute
    args or [])
  File "/opt/lib/python2.5/site-packages/Trac-0.11.1-py2.5.egg/trac/db/sqlite_backend.py", line 50, in _rollback_on_error
    return function(self, *args, **kwargs)
IntegrityError: columns ticket, time, field are not unique

Upon investigation it seems to have been caused by an unfortunately named custom field. It used comment for its name. Removing the field and creating another with the same label fixed the problem for us.

comment:3 by Christian Boos, 15 years ago

Component: generalticket system
Keywords: verify added
Milestone: 0.11.5

I'll try to reproduce this and then add 'comment' to the list of reserved field names, if needed.

comment:4 by Christian Boos, 15 years ago

Resolution: wontfix
Status: closedreopened

Verified.

comment:5 by Christian Boos, 15 years ago

Resolution: fixed
Status: reopenedclosed

… and fixed by [8167].

comment:6 by Christian Boos, 15 years ago

Owner: changed from Jonas Borgström to Christian Boos

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.