2843: Extensions' 'config/' and 'db/' admin links don't work when SITE_ROOT isn't '/'

camp*****@gmai***** (Google Code) (Is this you? Claim this profile.)
Feb. 18, 2013
What version are you running?

* ReviewBoard
* djblets 1.7.8

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

Any link to the config/ or db/ admin page of an extension

eg: http://example.com/reviews/admin/extensions/reviewbotext.extension.ReviewBotExtension/config/

What steps will reproduce the problem?
1. Install reviewboard *not* on the root of the web server. eg: /reviews/
2. install an extension (eg: ReviewBot)
3. click on the 'Configure' or 'Database' links from the extension list admin page

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

I expect to see the 'config/' or 'db'/ page, and instead I get a 404 with the following info:

Using the URLconf defined in djblets.util.rooturl, Django tried these URL patterns, in this order (irrelevant url patterns removed):

    ^reviews/ ^admin/extensions/ ^$
    ^reviews/ ^admin/ ^$
    ^reviews/ ^reviews/admin/extensions/reviewbotext.extension.ReviewBotExtension/config/
    ^reviews/ ^reviews/admin/extensions/reviewbotext.extension.ReviewBotExtension/config/
    ^reviews/ ^reviews/admin/extensions/reviewbotext.extension.ReviewBotExtension/db/

The current URL, reviews/admin/extensions/reviewbotext.extension.ReviewBotExtension/config/, didn't match any of these.

Note that if I manually enter http://example.com/reviews/reviews/admin/extensions/reviewbotext.extension.ReviewBotExtension/config/ (with the redundant '/reviews/') the page works.

I did some digging and this seems to be happening because djblets.extensions.base.ExtensionManager always prefixes the extension admin_urls with reverse('djblets.extensions.views.extension_list').lstrip('/') which ends up including the redundant '/reviews/' sub-url.
#1 david
  • +Component-Extensions
#2 raja****@gmai***** (Google Code) (Is this you? Claim this profile.)
Posted a review for this at http://reviews.reviewboard.org/r/3874/
#3 chipx86
Fixed on Djblets master (revision 8515309)
  • +Fixed
  • +Djblets