Edgewall Software
Modify

Opened 11 years ago

Closed 8 days ago

#11759 closed defect (duplicate)

Tickets: Trying to modify deleted comment crashes cryptically (“TypeError: unsubscriptable object”)

Reported by: Jun Omae Owned by:
Priority: low Milestone:
Component: ticket system Version: 0.12-stable
Severity: normal Keywords:
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Philippe Cloutier <chealer@…>)

How to reproduce

  1. Create a new ticket
  2. Add a comment to it
  3. In a browser/tab A, show the comment’s "Edit" form
  4. From another browser/tab, remove the comment
  5. From browser/tab A, submit the updated comment

The issue occurs with both 0.12-stable and 1.0-stable.

2014-09-16 12:15:40,582 Trac[main] ERROR: Internal Server Error:
Traceback (most recent call last):
  File "/src/tracdev/git/trac/web/main.py", line 529, in _dispatch_request
    dispatcher.dispatch(req)
  File "/src/tracdev/git/trac/web/main.py", line 243, in dispatch
    resp = chosen_handler.process_request(req)
  File "/src/tracdev/git/trac/ticket/web_ui.py", line 174, in process_request
    return self._process_ticket_request(req)
  File "/src/tracdev/git/trac/ticket/web_ui.py", line 499, in _process_ticket_request
    ticket.modify_comment(change['date'], req.authname, comment)
TypeError: unsubscriptable object

Attachments (0)

Change History (7)

comment:1 by Christian Boos, 11 years ago

Milestone: 0.12.71.0.3
Priority: normallow

Maybe too "corner-case" of a problem to be worth fixing on 0.12-stable. I'd suggest moving it on 1.0.3.

comment:2 by Ryan J Ollos, 11 years ago

Milestone: 1.0.3next-stable-1.0.x

Retargeting tickets in milestone:1.0.3 that have no owner. Please retarget as appropriate.

comment:3 by Ryan J Ollos, 9 years ago

Milestone: next-stable-1.0.xnext-stable-1.2.x

Moved ticket assigned to next-stable-1.0.x since maintenance of 1.0.x is coming to a close. Please move the ticket back if it's critical to fix on 1.0.x.

comment:4 by Ryan J Ollos, 6 years ago

Milestone: next-stable-1.2.xnext-stable-1.4.x

comment:5 by Ryan J Ollos, 2 years ago

Milestone: next-stable-1.4.xnext-stable-1.6.x

Milestone renamed

comment:6 by Philippe Cloutier <chealer@…>, 8 days ago

Description: modified (diff)
Milestone: next-stable-1.6.xunscheduled
Summary: TypeError raises when non existent comment of ticket is modifiedTickets: Trying to modify deleted comment crashes cryptically (“TypeError: unsubscriptable object”)

Thanks for reporting

Obviously, ideally:

  1. Tab B would warn that the comment is being modified.
  2. If deletion proceeds anyway, tab A would be notified as soon as the comment is deleted.

That being said, if this still occurs, I am not sure what is the best approach. Are all comments versioned (except for spam explicitly purged)? If so, should the deletion be deleted, or should a recreation entry be added? If not, should a purged comment be restored with its initial timestamp, or treated as a new comment? And if restoring, what should notifications say?

This comment is from Philippe "Chealer" Cloutier. All of my comments and contributions in this ticket are offered under the terms of CC0 1.0 (unless otherwise noted).

comment:7 by Jun Omae, 8 days ago

Milestone: unscheduled
Resolution: duplicate
Status: newclosed

It is a duplicate of #12623 which has been fixed in [15263] (Trac 1.0.14).

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'.
to The owner will be changed from (none) 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.