1040: loadDiffFragment is not defined

mcas****@gmai***** (Google Code) (Is this you? Claim this profile.)
April 14, 2009
What's the URL of the page containing the problem?
http://reviewboard/r/1135


What steps will reproduce the problem?
1.  Post a review
2.  Make a comment on the review
3.  View the resulting review

What is the expected output? What do you see instead?
I expect the main review page to show the comments with diff fragments. 
Instead I see pinwheels where the diff fragments would be, and all the JS
on the page is broken (drop down menus to submit a review, etc)

What operating system are you using? What browser?
Linux, review board beta 2, firefox 3

Please provide any additional information below.
If I load up the Error console it says "loadDiffFragment" is not defined. 
This issue crops up when you have a diff comment, the system goes to load
the diff fragment, and the resulting JS error crashes much of the
functionality of the page.  I grepped through my install and the only
function that exists is "loadDiffFragments" with an s, there is no
"loadDiffFragment".
#1 dfra****@gmai***** (Google Code) (Is this you? Claim this profile.)
Same problem with firefox 2.
#2 mcas****@gmai***** (Google Code) (Is this you? Claim this profile.)
I noticed that /usr/lib/python2.5/site-packages/ReviewBoard-1.0alpha4-py2.5.egg was
still hanging around so I blasted it.  After that my site got cranky which blows my
mind... I ls'ed my installed site and there were no references to the alpha egg,
everything was referencing the beta2 egg.  Either way, I blasted the egg, reinstalled
using rb-site, copied my db over and now everything is working.

Some bug may exist that makes upgrading from alpha4 to beta2 difficult but I won't be
able to reproduce it.
#3 dfra****@gmai***** (Google Code) (Is this you? Claim this profile.)
However, mcassano had to edit the server-side code in media/rb/js/reviews.js to
rename the function "queueLoadDiffFragments" to "queueLoadDiffFragment" to get it to
work!
chipx86
#4 chipx86
Editing that file own't make it work. You'll hit new, more confusing errors.

I think you forgot to run rb-site upgrade /path/to/site after upgrading Review Board.
That would certainly cause this problem.
#5 mcas****@gmai***** (Google Code) (Is this you? Claim this profile.)
I remember running rb-site upgrade before the problem crept up, and I certainly ran
it many times when trying to debug.  Either way, thanks for the help.
chipx86
#6 chipx86
I've also seen downgrades cause this, and there may be other weird corner cases we
need to address. It could also be some stale data in either the server-side or
browser-side caches. Sometimes there's some cleanup that's needed. Anyway, glad it
works now.

(Closing as UserError just because it's the closest thing we have to "it was
something on the user's side that has been fixed," not because "It's the user's fault.")
  • +UserError