249: Unable to delete comments
- Fixed
- Review Board
ryan.ga*******@gmai***** (Google Code) (Is this you? Claim this profile.) | |
|
|
Dec. 12, 2007 |
> What's the URL of the page containing the problem? http://reviewboard.eng.vmware.com/r/3890/diff/1/#file55653line129 > What steps will reproduce the problem? 1. Write a line comment, save it, and close the comment window. 2. Re-open the comment window and click Delete Comment. 3. > What is the expected output? What do you see instead? I expect the comment to be deleted. Instead I get INTERNAL SERVER ERROR text in the comment window and the comment isn't deleted. > What operating system are you using? What browser? Windows XP sp2, Firefox 2.0.0.7 > Please provide any additional information below. Some comments are deleted for me when I re-visit them, but several do not seem to be able to be deleted. Instead I just replace the text with "ignore".
I had 6 large reviews to do, during which I probably wrote about 50 comments. It occurred twice. But when it did occur, it would happen every time with that comment. It's definitely intermittent. If it happens again I'll try to provide more info.
I also experienced this issue. Once this has occured, the review can't be published. It is not clear at all what it is about the changeset or comments that triggers the problem.
I've been able to reproduce this reliably. Due to issue 310, if you edit a comment, it will create a copy of the comment instead of updating the old one. When you try to hit the Delete button, you get Internal Server Error. I tracked down the traceback to: Traceback (most recent call last): File "/data/home/ehuss/work/third_party/reviewboard/reviews/json.py", line 1096, in diff_line_comments interfilediff_id) File "/data/home/ehuss/work/third_party/reviewboard/reviews/json.py", line 1162, in _diff_line_comments comment = review.comments.get(q) File "/usr/local/lib/python2.5/site-packages/django/db/models/manager.py", line 69, in get return self.get_query_set().get(*args, **kwargs) File "/usr/local/lib/python2.5/site-packages/django/db/models/query.py", line 264, in get assert len(obj_list) == 1, "get() returned more than one %s -- it returned %s! Lookup parameters were %s" % (self.model._meta.object_name, len(obj_list), kwargs) AssertionError: get() returned more than one Comment -- it returned 2! Lookup parameters were {} Also, as a side issue, if you accidentally double click the Save Comment button, it tends to save the comment twice (the extra click gets in before the button gets greyed out), and leads you back to this problem where you can't delete them. As a workaround, you can click "Delete Draft" to clear your changes.
I'm running into the same issue when I try to delete a comment I've added too. I get "INTERNAL SERVER ERROR." This makes it really hard to use reviewboard in a natural way. I didn't really want to delete my comments, but when I tried to edit my comment in the same review session pre-publish, it created a new copy of my comment block, forcing me to try and delete the older comment block, when I got this error. Do you want another PR about the "don't create new copy when editing comments" issue?