fuzan / rietveld

Automatically exported from code.google.com/p/rietveld
Apache License 2.0
0 stars 0 forks source link

AttributeError when replying to message after issue was committed #394

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

This problem occurred in the Rietveld instance for the Python bug tracker.

1. I typed in a reply to this message:

http://bugs.python.org/review/15510/#ps5944

2. The corresponding issue was committed/closed in the Python bug tracker.

3. I clicked reply to save/send my message.

What is the expected output? What do you see instead?

I expected that the reply would be saved and sent.  However, I got the error 
below instead.  Moreover, when I clicked the "back" button, the contents of my 
reply were lost.  I'm marking this "High" because someone can lose the message 
they spent time typing up because of this error.  If clicking "back" restored 
the reply contents, the issue would not be as serious.

It is possible that this error occurred because the corresponding issue in the 
Python tracker was resolved between the time the user started replying and 
clicking "reply".  The issue was closed/committed between the time that I 
started typing the reply and hit "reply".  Otherwise, I don't know what special 
circumstances might have caused the issue.

AttributeError at /review/15510/publish
'NoneType' object has no attribute 'issue'
Request Method: POST
Request URL:    http://bugs.python.org/review/15510/publish
Django Version: 1.2.3
Exception Type: AttributeError
Exception Value:    
'NoneType' object has no attribute 'issue'
Exception Location: /home/roundup/trackers/tracker/rietveld/codereview/views.py 
in _make_message, line 3223
Python Executable:  /usr/bin/python
Python Version: 2.6.6
Python Path:    ['/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2', 
'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old', 
'/usr/lib/python2.6/lib-dynload', '/usr/local/lib/python2.6/dist-packages', 
'/usr/lib/python2.6/dist-packages', '/usr/lib/pymodules/python2.6', 
'/home/roundup/trackers/tracker/rietveld']
Server time:    Sat, 8 Sep 2012 19:48:08 +0200

Environment:

Request Method: POST
Request URL: http://bugs.python.org/review/15510/publish
Django Version: 1.2.3
Python Version: 2.6.6
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.admin',
 'gae2django',
 'rietveld_helper',
 'codereview']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'roundup_helper.middleware.LookupRoundupUser',
 'gae2django.middleware.FixRequestUserMiddleware',
 'rietveld_helper.middleware.DisableCSRFMiddleware',
 'rietveld_helper.middleware.AddUserToRequestMiddleware',
 'django.middleware.doc.XViewMiddleware')

Traceback:
File "/usr/lib/pymodules/python2.6/django/core/handlers/base.py" in get_response
  95.                     response = middleware_method(request, callback, callback_args, callback_kwargs)
File "/home/roundup/trackers/tracker/rietveld/rietveld_helper/middleware.py" in 
process_view
  37.         response = view_func(request, *view_args, **view_kwargs)
File "/home/roundup/trackers/tracker/rietveld/codereview/views.py" in 
login_wrapper
  657.     return func(request, *args, **kwds)
File "/home/roundup/trackers/tracker/rietveld/codereview/views.py" in 
issue_wrapper
  741.     return func(request, *args, **kwds)
File "/home/roundup/trackers/tracker/rietveld/codereview/views.py" in 
xsrf_wrapper
  694.     return func(request, *args, **kwds)
File "/home/roundup/trackers/tracker/rietveld/codereview/views.py" in publish
  3053.                       in_reply_to=form.cleaned_data.get('in_reply_to'))
File "/home/roundup/trackers/tracker/rietveld/codereview/views.py" in 
_make_message
  3223.       replied_issue_id = msg.in_reply_to.issue.key().id()

Exception Type: AttributeError at /review/15510/publish
Exception Value: 'NoneType' object has no attribute 'issue'

Original issue reported on code.google.com by chris.je...@gmail.com on 8 Sep 2012 at 6:34

GoogleCodeExporter commented 9 years ago
This issue might relate to gae2django and not Rietveld itself. I'll have a look 
at it.

Original comment by albrecht.andi on 8 Sep 2012 at 7:37

GoogleCodeExporter commented 9 years ago
Maybe. But since the None object in question seems to be in_replace_to I'd 
first look at gae2django. AFAIK MvL did only changes to the authentication 
system. But I'll contact him when in doubt.

Original comment by albrecht.andi on 8 Sep 2012 at 7:56

GoogleCodeExporter commented 9 years ago
I encountered this issue again.  It doesn't seem to be related to whether the 
issue was closed.

Original comment by chris.je...@gmail.com on 1 Oct 2012 at 2:28

GoogleCodeExporter commented 9 years ago
Also, the issue occurs even if I open a new tab in Chrome to the same URL and 
try replying again.

Original comment by chris.je...@gmail.com on 1 Oct 2012 at 3:11

GoogleCodeExporter commented 9 years ago
I'm having the same problem. 

The review link: http://bugs.python.org/review/16105/

Original comment by felipec...@gmail.com on 11 Oct 2012 at 1:16

GoogleCodeExporter commented 9 years ago
Another information,, This issue, happens only in the 'main' review page - 
http://bugs.python.org/review/16105/

Reviewing in a 'patch file' page it's working.
http://bugs.python.org/review/16105/patch/6163/23085

Original comment by felipec...@gmail.com on 11 Oct 2012 at 1:30

GoogleCodeExporter commented 9 years ago
I experienced this again and was unable to post a reply after several attempts. 
 I also lost my reply text the first time it happened because it was gone when 
I hit "back" in the browser.

Original comment by chris.je...@gmail.com on 28 Nov 2012 at 2:45