3033: Repository settings break when using bug tracking hosting services with extra %s

dkmorgan
May 20, 2014
What version are you running?
Review Board 1.7.11

What's the URL of the page containing the problem?
http://servername/reviewboard/admin/db/scmtools/repository/1/

What steps will reproduce the problem?
1. Add a SVN repository with bugtracker set to Redmine and URL set to: http://servername/redmine/issues/%s
2. Save repository settings.
3. Edit the repository settings. (e.g. Change the repository name, or remove the bugtracker settings)
4. Save repository settings.

What is the expected output? What do you see instead?
I expected the changes to be saved.
Instead, any changes to the repository settings are rejected with an error.

What operating system are you using? What browser?
Windows XP SP3, Firefox 17.

Please provide any additional information below.
It seems like any changes to the repository settings are rejected once the bugtracker is set.
david
#1 david
What's the error?
  • +NeedInfo
dkmorgan
#2 dkmorgan
When I try to save the changes, I get a red message at the top stating to fix the error below.
However, there are no indications of any errors in the actual settings.
dkmorgan
#3 dkmorgan
Is there anything else I can provide to have this looked at?
chipx86
#4 chipx86
This is an occasional bug that some types of errors can trigger.

You can try changing your Hosting Service field to Custom and see if an error appears. Usually, it's an internally populated field that has the error.

We're working on a new design for this entire page that will avoid such errors.
dkmorgan
#5 dkmorgan
The Hosting Service field is already set to Custom.
I will wait for the release of the new design.
Out of curiosity, are there any drawbacks in changing the database entry directly for the Repository Name? 
chipx86
#6 chipx86
For the repository name, no. You can set that without problems.

Maybe try viewing the sourcecode and searching for "error" and see if anything appears?
#7 k.kot*****@gmai***** (Google Code) (Is this you? Claim this profile.)
I get this error (without any details) when I try to grant/revoke a user access to a custom git repository. This is pretty important, you know... I have DEBUG=True yet nothing is logged! *How* can I find out WTF is wrong with this and FIX it?

If I recreate the repo with the same set of users, everything works.

RB 1.7.12, postgresql. Also, this is not "occasional".
chipx86
#8 chipx86
I can see you're upset, but the symptoms described in this bug have many possible causes, and are often specific to certain configurations. It's occasional in general, but may very well be consistent in your case.

I'm happy to help, but I appreciate calm reports.

Now, DEBUG=True doesn't affect log output. This is a validation issue on the form. To diagnose it, I need to know exactly what your configuration looks like. A screenshot would help.

I also need you to read through my questions to the prior reporter and provide the requested answers.
david
#9 david
  • +Component-Admin
#10 k.kot*****@gmai***** (Google Code) (Is this you? Claim this profile.)
"Maybe try viewing the sourcecode and searching for "error" and see if anything appears?"

Attached.

Configuration is like this:
Name: foo
Show this repository: checked
Hosting service: None - Custom Repository
Repository type: Git
Path: /srv/git/repositories/foo.git
Mirror path: git@somehostname:foo.git
Raw file URL mask: empty
Username: empty
Password: empty
Bug tracker type: Trac
Trac URL: http://somehostname:8013/ticket/%s
Publicly accessible: unchecked

That's pretty much it.
  • +
        <div id="error"></div>
        <p class="errornote">
        Please correct the error below.
       <p style="display: none;" class="errornote">The authentication requirements for this account has changed. You will need to re-authenticate.</p></div>
       <div class="form-row error field-googlecode_project_name" id="row-googlecode_project_name">
        <ul class="errorlist"><li>This field is required.</li></ul>
       <div class="form-row error field-bitbucket_repo_name" id="row-bitbucket_repo_name">
        <ul class="errorlist"><li>This field is required.</li></ul>
       <div class="form-row error field-github_private_org_name" id="row-github_private_org_name">
        <ul class="errorlist"><li>This field is required.</li></ul>
       <div class="form-row error field-github_private_org_repo_name" id="row-github_private_org_repo_name">
        <ul class="errorlist"><li>This field is required.</li></ul>
       <div class="form-row error field-github_public_org_name" id="row-github_public_org_name">
        <ul class="errorlist"><
david
#11 david
I'm not sure if it's what's causing the error, but using Git requires the "Raw file URL mask" and a service like cgit or gitweb.

See http://www.reviewboard.org/docs/manual/1.7/admin/configuration/repositories/#raw-file-urls for more info.
#12 k.kot*****@gmai***** (Google Code) (Is this you? Claim this profile.)
That's a documentation bug then, because it works without it.
Besides, filling it doesn't help.
david
#13 david
Oh, in addition, I think your bug tracker URL isn't right.

The URL you entered is correct if you were entering it as a custom one, but since you've told it that it's trac, you can just put http://somehostname:8013/
#14 k.kot*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Now you have hit it. The catch is that once you put additional '%s' in the Trac URL it cannot be fixed since entire forms doesn't work anymore. Setting it to "None" doesn't work either. Dead end.

So, three problems?
1. validation doesn't catch "double %s' in the Trac URL when it's initially set
2. it catches it later breaking the form
3. it doesn't show the exact error, only "Please correct the error below."
david
#15 david
  • -NeedInfo
    +New
  • +Component-Settings
  • +Repository settings break when using bug tracking hosting services with extra %s
#16 k.kot*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Just a note: it can be worked around by setting Bug tracker type to Custom, then removing extra '%s', then setting it back to Trac. So much fun!
david
#17 david
  • +EasyFix
#18 vly****@gmai***** (Google Code) (Is this you? Claim this profile.)
Ok, I can reproduce it and try to fix it.
david
#20 david
  • -New
    +PendingReview
david
#21 david
Fixed in release-2.0.x (e0a8fef). Thanks!
  • -PendingReview
    +Fixed