4564: Update diff button not working on 3.0 beta 1

apetkova
4604

What version are you running?

3.0 beta 1

What's the URL of the page containing the problem?

What steps will reproduce the problem?

  1. Create new review request with diff
  2. Go to Update -> Update diff

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

Expected: A dialog for uploading the new diff.
Actual: Nothing happens; Following error is displayed in browser javascript console:

reviews.min.683fde729e23.js:9 Uncaught ReferenceError: updateDiffView is not defined
at r._onUpdateDiffClicked (reviews.min.683fde729e23.js:9)
at HTMLAnchorElement.dispatch (jquery-1.11.1.min.8101d596b2b8.js:3)
at HTMLAnchorElement.r.handle (jquery-1.11.1.min.8101d596b2b8.js:3)

_onUpdateDiffClicked @ reviews.min.683fde729e23.js:9
dispatch @ jquery-1.11.1.min.8101d596b2b8.js:3
r.handle @ jquery-1.11.1.min.8101d596b2b8.js:3

What operating system are you using? What browser?

Windows 10 + Google Chrome 58.0.3029.110 (64-bit)
OSX 10.11.1(El Capitan) + Google Chrome 58.0.3029.110 (64-bit)
OSX 10.11.1(El Capitan) + Mozilla Firefox 53.0.3 (64-bit)

Please provide any additional information below.

Updating the diff is possible via RBTools, but not via web UI.

#1 mbachori

Root cause: the issue is caused by missing declaration of selectParentDiffText in /usr/local/lib/python2.7/dist-packages/ReviewBoard-3.0rc1-py2.7.egg/reviewboard/static/rb/js/views/uploadDiffView.js:

33c33,34
< selectDiffText;


        selectDiffText,
  selectParentDiffText;

Workardound: this can be fixed on deployed RB too, on my installation I had to fix /usr/local/lib/python2.7/dist-packages/ReviewBoard-3.0rc1-py2.7.egg/reviewboard/htdocs/static/rb/js/reviews.min*.js files with similar diff (the file is uglified, so you need to find occurence of "selectDiffText;" and change it to "selectDiffText,selectParenDiffText;". There might be better way (e.g. to apply above diff to uploadDiffView.js and re-deploy the files, but I no expert and have no time to find out how to do it).

#2 mbachori

BTW the issue is present in RC1 too.

david
#3 david

This has been fixed in git and will be included in the final 3.0 release.