845: AJAX_SERIAL causing diffs to not load

jeff****@gmai***** (Google Code) (Is this you? Claim this profile.)
Feb. 4, 2009
846
We upgraded from r1668 to r1739 today.  When looking at diffs, we get this:
Error: 'Settings' object has no attribute 'AJAX_SERIAL'

Removing the change in r1736 allows us to see the diffs again.  However, 
the progressive loading "spinner" shows constantly next to some (not all) 
lines in the "Files changed" list at the top of a diff page.
chipx86
#1 chipx86
Make sure you upgrade Djblets as well.

We're putting out a release tonight and will fix dependencies so the required Djblets
is auto-fetched.
  • +NeedInfo
#3 jeff****@gmai***** (Google Code) (Is this you? Claim this profile.)
It didn't work:

>easy_install --upgrade Djblets
Searching for Djblets
Reading http://pypi.python.org/simple/Djblets/
Reading http://www.review-board.org/wiki/Djblets
Reading http://www.review-board.org/downloads/nightlies
Best match: djblets 0.5alpha2.dev-20090203
Processing djblets-0.5alpha2.dev_20090203-py2.5.egg
djblets 0.5alpha2.dev-20090203 is already the active version in easy-install.pth

Using c:\devtools\python25\lib\site-packages\djblets-0.5alpha2.dev_20090203-py2.5.egg
Reading http://downloads.review-board.org/mirror/
Reading http://downloads.review-board.org/nightlies/
Processing dependencies for Djblets
Finished processing dependencies for Djblets
chipx86
#4 chipx86
Weird.. Okay, I have to check.. You restarted the server, right?
#5 keithho*******@gmai***** (Google Code) (Is this you? Claim this profile.)
I'm seeing a similar error.  I'm installing reviewboard for the first time and am
presumably up to date.  I get a TypeError instead when attempting to view diffs, also
occurring at line 53 in views.py.

It looks like maybe it just need a str(settings.AJAX_SPECIAL) but I'm a relative
novice to python and don't know how to recompile (right word?) the egg.  Just
changing the code didn't work.

Traceback (most recent call last):
  File
"/usr/lib/python2.5/site-packages/ReviewBoard-1.0alpha2.dev_20090203-py2.5.egg/reviewboard/diffviewer/views.py",
line 193, in view_diff_fragment
    chunkindex,
  File
"/usr/lib/python2.5/site-packages/ReviewBoard-1.0alpha2.dev_20090203-py2.5.egg/reviewboard/diffviewer/views.py",
line 53, in build_diff_fragment
    """ key += '-' + str(settings.AJAX_SERIAL) """
TypeError: cannot concatenate 'str' and 'int' objects


#6 keithho*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Ok, if you change line 53 to read
key += '-' + str(settings.AJAX_SERIAL)

and then do a (at least on Ubuntu server)
/etc/init.d/apache2 restart

things SEEM to work.
chipx86
#7 chipx86
Yeah, that should work.

Tonight's release will fix that. Sorry about that!
#8 keithho*******@gmai***** (Google Code) (Is this you? Claim this profile.)
Oops, the diff will only work the first time.  After that, you'll get the error
mentioned by the OP:

'Settings' object has no attribute 'AJAX_SERIAL' Details
chipx86
#9 chipx86
Okay, I have an idea as to the problem. I'll look into it and get a fix into SVN.
  • -NeedInfo
    +Started
chipx86
#10 chipx86
Fixed in Djblets and Review Board SVN.

I'll be doing a 1.0 alpha 2 release soon.
  • -Started
    +Fixed