Server error pages are broken
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
OpenStack Dashboard (Horizon) |
Fix Released
|
Medium
|
Kieran Spear | ||
Folsom |
Fix Released
|
Medium
|
Matthias Runge |
Bug Description
When an unhandled exception occurs with DEBUG=False, openstack_dashboard tries to render the 500.html template but fails because it inherits the base.html template, which then includes _conf.html, which expects the STATIC_URL context variable to be present. 500 errors are a special case in Django because they are passed an empty Context rather than the usual RequestContext[1].
This results in a somewhat cryptic compressor error:
[Tue Oct 16 00:30:39 2012] [error] [client 128.250.116.167] UncompressableF
...which you can eventually trace back to this line in horizon/_conf.html:
<script src='{{ STATIC_URL }}horizon/
...where STATIC_URL evaluates to an empty string.
From a discussion[2] on the Django dev list it looks like there are a few options:
1) Make the error page simpler (i.e., don't inherit base.html)
2) Replace use of STATIC_URL with the staticfiles 'static' templatetag[3]. There may be other context variables in templates that are still missing though.
3) Override the handler and pass in the RequestContext anyway (this is exactly what Django is attempting to avoid, since any errors in generating the context will break your error page).
I think (1) is reasonable and low maintenance. What do you think?
[1] https:/
[2] https:/
[3] https:/
Changed in horizon: | |
importance: | Undecided → Medium |
milestone: | none → grizzly-1 |
status: | New → Confirmed |
Changed in horizon: | |
status: | Fix Committed → Fix Released |
Changed in horizon: | |
milestone: | grizzly-1 → 2013.1 |
Fix proposed to branch: master /review. openstack. org/16152
Review: https:/