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 )
How to reproduce
- Create a new ticket
- Add a comment to it
- In a browser/tab A, show the comment’s "Edit" form
- From another browser/tab, remove the comment
- 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 , 11 years ago
| Milestone: | 0.12.7 → 1.0.3 |
|---|---|
| Priority: | normal → low |
comment:2 by , 11 years ago
| Milestone: | 1.0.3 → next-stable-1.0.x |
|---|
Retargeting tickets in milestone:1.0.3 that have no owner. Please retarget as appropriate.
comment:3 by , 9 years ago
| Milestone: | next-stable-1.0.x → next-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 , 6 years ago
| Milestone: | next-stable-1.2.x → next-stable-1.4.x |
|---|
comment:6 by , 8 days ago
| Description: | modified (diff) |
|---|---|
| Milestone: | next-stable-1.6.x → unscheduled |
| Summary: | TypeError raises when non existent comment of ticket is modified → Tickets: Trying to modify deleted comment crashes cryptically (“TypeError: unsubscriptable object”) |
Thanks for reporting
Obviously, ideally:
- Tab B would warn that the comment is being modified.
- 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 , 8 days ago
| Milestone: | unscheduled |
|---|---|
| Resolution: | → duplicate |
| Status: | new → closed |



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