Page rendering and default route

80 views
Skip to first unread message

Steve

unread,
Jun 26, 2019, 10:26:09 AM6/26/19
to Review Board Community
Hi,

I'm new to Reviewboard but managed to find my way around through an upgrade from 1.6.. to 3.0. whilst changing from Mod_Python to WSGI. Also upgraded from Ubuntu 12.04  to 18.06 and there seemed to be a few dependency issues to sort out on the way.

Anyway Reviewboard seems to working now at least with all the original data but I have two problems.


Problem 1.

There is no page rendering or graphics throughout, it's just plain text based. Initially I thought it was permissions related or at least in the /var/www/RB directory so I created a test site under 3.0.. and just compared the two, all seemed to be the same.


snip.png



Problem 2.

I have trac/svn running on the same machine. If I enable reviewboard.conf in apache, reviewboard seems to take over and what was http://localhost/trac or locahost/ goes to reviewboard. If I disable reviewboard.conf then trac/svn works fine. Been through .conf, .wsgi and settings_local.py but cant seem to make it work. I thought that site route as /reviewboard/ would have changed it's focus but I guess not.
 

Any help would be appreciated.


Thanks in advance.
Steve.

Paul Mansfield

unread,
Jun 26, 2019, 11:39:44 AM6/26/19
to Review Board Community
check you have the following mappings in your apache config for reviewboard

# Alias static media requests to filesystem
Alias /media "/var/www/reviewboard/htdocs/media"
Alias /static "/var/www/reviewboard/htdocs/static"
Alias /errordocs "/var/www/reviewboard/htdocs/errordocs"
Alias /favicon.ico "/var/www/reviewboard/htdocs/static/rb/images/favicon.png"



Steve

unread,
Jun 26, 2019, 12:06:02 PM6/26/19
to Review Board Community
Yes all present and correct.

Christian Hammond

unread,
Jun 26, 2019, 8:04:29 PM6/26/19
to revie...@googlegroups.com
Hi,

Can you show me one of the URLs it’s trying to load (say, a CSS file)?

Also, two things to check:

1) Make sure you have the following in your $sitedir/conf/settings_local.py

    DEBUG = False

2) Run this and look at the paths that are set. Make sure they are what you expect:

    rb-site manage $sitedir list-siteconfig

Christian


--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/3519b207-35bb-46b1-bd41-442c4e5d29a4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
--
Christian Hammond
President/CEO of Beanbag
Makers of Review Board

Steve

unread,
Jun 27, 2019, 5:19:58 AM6/27/19
to Review Board Community
Hi Christian,

Hm, the paths seem to have old references as well as new. site_media_root is definitely a throw back from the original install. Originally reviewboard was running on Gentoo and I created a working clone under Ubuntu with a reviewboard default directory structure. All seemed to work fine until the upgrade from 1.6.. to 3.0.. At that point the directory structure changed so I assume these paths are not part of the upgrade process.

"logging_directory": "/var/log/reviewboard"
"site_media_root": "/var/www/localhost/htdocs/reviewboard/htdocs/media",
"site_static_root": "/var/www/reviewboard/htdocs/static",
"site_static_url": "/reviewboard/static/",
"site_media_url": "/reviewboard/media/",

Where can I modify these.

------------------------

DEBUG = False


Steve.




On Thursday, 27 June 2019 01:04:29 UTC+1, Christian Hammond wrote:
Hi,

Can you show me one of the URLs it’s trying to load (say, a CSS file)?

Also, two things to check:

1) Make sure you have the following in your $sitedir/conf/settings_local.py

    DEBUG = False

2) Run this and look at the paths that are set. Make sure they are what you expect:

    rb-site manage $sitedir list-siteconfig

Christian

On Wed, Jun 26, 2019 at 09:06 Steve <steve...@gmail.com> wrote:
Yes all present and correct.




On Wednesday, 26 June 2019 16:39:44 UTC+1, Paul Mansfield wrote:
check you have the following mappings in your apache config for reviewboard

# Alias static media requests to filesystem
Alias /media "/var/www/reviewboard/htdocs/media"
Alias /static "/var/www/reviewboard/htdocs/static"
Alias /errordocs "/var/www/reviewboard/htdocs/errordocs"
Alias /favicon.ico "/var/www/reviewboard/htdocs/static/rb/images/favicon.png"



--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to revie...@googlegroups.com.

Steve

unread,
Jun 27, 2019, 6:04:18 AM6/27/19
to Review Board Community

Also console log.

(index):262 GET http://10.132.40.199/reviewboard/static/rb/js/base.min.af574b99af97.js net::ERR_ABORTED 404 (NOT FOUND)
(index):262 GET http://10.132.40.199/reviewboard/static/rb/js/base.min.af574b99af97.js net::ERR_ABORTED 404 (NOT FOUND)
(index):264 Uncaught ReferenceError: RB is not defined
    at (index):264
(anonymous) @ (index):264

Christian Hammond

unread,
Jun 27, 2019, 7:17:49 AM6/27/19
to revie...@googlegroups.com
You can use the set-siteconfig management command, like so:

    rb-site manage $sitedir set-siteconfig -- --key=site_media_root --value=...

Note the -- before the first flag. This is currently necessary for ensuring the arguments are passed to set-siteconfig and not rb-site.

Christian


To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/00413b2c-ce38-45b7-afd5-889d38fabe01%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Steve

unread,
Jun 27, 2019, 8:03:44 AM6/27/19
to Review Board Community
re-set site_media_root and tried again but still the same issue.

re-set site_static_url and then tried site_madia_url but keep getting this back



  File "/usr/local/lib/python2.7/dist-packages/Djblets-1.0.12-py2.7.egg/djblets/siteconfig/django_settings.py", line 326, in apply_django_settings
    setter(settings, setting_key, value)
  File "/usr/local/lib/python2.7/dist-packages/django/utils/functional.py", line 242, in __setattr__
    setattr(self._wrapped, name, value)
  File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 110, in __setattr__
    raise ImproperlyConfigured("If set, %s must end with a slash" % name)
django.core.exceptions.ImproperlyConfigured: If set, MEDIA_URL must end with a slash


svnadmin@NEO-SVN-SVR:/var/www/reviewboard$ sudo rb-site manage /var/www/reviewboard set-siteconfig -- --key=site_media_url --value=/var/www/reviewboard/htdocs/media/




can't seem to get a list-siteconfig without the same error.

Christian Hammond

unread,
Jun 29, 2019, 12:37:08 AM6/29/19
to revie...@googlegroups.com
Hi Steve,

The URL parameters are used to build the URLs to media files. They must be a path relative to the domain, or the absolute path to a server (CDN) serving the files. You’re going to want to only set the “root” equivalents.

Try setting site_static_url to /static/ and site_media_url to /media/.

Christian


--
Supercharge your Review Board with Power Pack: https://www.reviewboard.org/powerpack/
Want us to host Review Board for you? Check out RBCommons: https://rbcommons.com/
Happy user? Let us know! https://www.reviewboard.org/users/
---
You received this message because you are subscribed to the Google Groups "Review Board Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Steve

unread,
Jun 29, 2019, 4:53:39 AM6/29/19
to Review Board Community
The test site I created within 3.0..showed the same as you describe so I tried /static/ and /media/ but still get the same error message. Trouble is I now cant run list-siteconfig on the site i'm upgrading so cant check other settings for conflicts. What settings should I set that relate to domain, only I cant see anything in the test site that would give me a clue. Or are we talking about settings in another file.


Steve.


To unsubscribe from this group and stop receiving emails from it, send an email to revie...@googlegroups.com.

Christian Hammond

unread,
Jun 30, 2019, 5:53:04 PM6/30/19
to revie...@googlegroups.com
These settings are stored in the database. What’s happening when you run list-siteconfig?

Christian


To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/74f2e570-c63a-49d0-a80f-e39966539536%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Steve

unread,
Jul 1, 2019, 5:02:52 AM7/1/19
to Review Board Community
Just comes back with the same error message below about " If set, MEDIA_URL must end with a slash". Doesn't seem to be able to get past the error.


Steve.

Steve

unread,
Jul 11, 2019, 4:56:37 AM7/11/19
to Review Board Community
Hi Christian,

Any thoughts on getting past this error. Can I remove MEDIA_URL and add it back once I understand the problem.



Steve.

Christian Hammond

unread,
Jul 11, 2019, 5:36:32 AM7/11/19
to revie...@googlegroups.com
Hi Steve,

You need to set the following using set-siteconfig:

site_media_url=/media/
site_static_url=/static/
site_static_root=/var/www/reviewboard/htdocs/static/
site_media_root=/var/www/reviewboard/htdocs/media/

I think from the example you gave, you're mixing up the site roots and URLs.

Sorry I haven't gotten back to you until now. Our paid support channel takes a lot of my support time these days.

Christian

To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/0de14872-b497-40e8-8b6d-1afb1541fe75%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.


--

Steve

unread,
Jul 11, 2019, 6:17:23 AM7/11/19
to Review Board Community
I've tried the four keys below including values for these keys that are incorrect just to try and get a different result but is always the same. whether I list-siteconfig or try and set 'site_media_url' to '/media/' or any other keys, this error below is persistent. Cant seem to get past it.

Interestingly the response says "if set" does that mean I can remove it temporarily.



svnadmin@NEO-SVN-SVR:~$ sudo rb-site manage /var/www/reviewboard set-siteconfig -- --key=site_media_url --value=/media/
Traceback (most recent call last):
  File "/usr/local/bin/rb-site", line 11, in <module>
    load_entry_point('ReviewBoard==3.0.15', 'console_scripts', 'rb-site')()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-3.0.15-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1972, in main
    command.run()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-3.0.15-py2.7.egg/reviewboard/cmdline/rbsite.py", line 1881, in run
    initialize()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-3.0.15-py2.7.egg/reviewboard/__init__.py", line 114, in initialize
    load_site_config()
  File "/usr/local/lib/python2.7/dist-packages/ReviewBoard-3.0.15-py2.7.egg/reviewboard/admin/siteconfig.py", line 294, in load_site_config
    apply_django_settings(siteconfig, settings_map)

Christian Hammond

unread,
Jul 12, 2019, 2:41:25 PM7/12/19
to revie...@googlegroups.com
I see what’s going on... it’s in a sort of stuck state. Django is trying to validate those URLs before you’re able to set new ones.

You’re going to have to hand-edit the JSON data in the siteconfig_siteconfiguration table in the database. There’s a single row there containing all the JSON data you see in list-siteconfig (though more compact).

Are you familiar with SQL?

Christian 


To unsubscribe from this group and stop receiving emails from it, send an email to reviewboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/reviewboard/56969485-3e66-42f4-a42b-8ff5d90206b1%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Steve

unread,
Jul 15, 2019, 8:53:14 AM7/15/19
to Review Board Community
Yes, used SQL a while back.

I'll take a look



Steve.


Reply all
Reply to author
Forward
0 new messages