Edgewall Software
Modify

Opened 7 years ago

Closed 6 years ago

Last modified 6 years ago

#6975 closed defect (fixed)

error on adding comment to ticket

Reported by: gimre@… Owned by: cboos
Priority: normal Milestone: 0.11.5
Component: ticket system Version: 0.10.4
Severity: normal Keywords: verify
Cc:
Release Notes:
API 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 Changed 7 years ago by cboos

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

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 Changed 6 years ago by olaf.meeuwissen@…

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 Changed 6 years ago by cboos

  • Component changed from general to ticket system
  • Keywords verify added
  • Milestone set to 0.11.5

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

comment:4 Changed 6 years ago by cboos

  • Resolution wontfix deleted
  • Status changed from closed to reopened

Verified.

comment:5 Changed 6 years ago by cboos

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

… and fixed by [8167].

comment:6 Changed 6 years ago by cboos

  • Owner changed from jonas to cboos

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed The owner will remain cboos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from cboos to the specified user.
Author


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

 
Note: See TracTickets for help on using tickets.