First time here? Check out the FAQ!

Revision history  [back]

Adding "Instructions on how to ask questions" leads to server errors.

I've just been trying to add a snippet to the "Instructions on how to ask questions" setting. I validated the snippet, and it's correct:

<h2>How do I ask a good question?</h2>
Good questions are easy to find, and should have enough information for someone to suggest a solution. Here are some tips on asking good questions:

<ul>
<li>Frame a question</li>
<li>Use correct tags. See the <a href="ask.stg.fedoraproject.org/tags">list of tags</a> for what tags you should use. It makes it easy for people to find your question</li>
<li>Use the mark up tools: This makes your question more readable</li>
<li>Provide information that could be helpful to a reader</li>
</ul>

A complete list of tips is maintained on our <a href="https://fedoraproject.org/wiki/Ask_fedora_guidelines#List">guidelines page</a>. Please do read it through at least once.

When I click the "save" button, the server barfs with an internal error. Here's the httpd error log snippet:

[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88] mod_wsgi (pid=14598): Exception occurred processing WSGI script '/usr/sbin/askbot.wsgi'.
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88] Traceback (most recent call last):
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]   File "/usr/lib/python2.6/site-packages/django/core/handlers/wsgi.py", line 272, in __call__
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]     response = self.get_response(request)
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]   File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 169, in get_response
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]     response = self.handle_uncaught_exception(request, resolver, sys.exc_info())
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]   File "/usr/lib/python2.6/site-packages/django/core/handlers/base.py", line 218, in handle_uncaught_exception
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]     return callback(request, **param_dict)
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]   File "/usr/lib/python2.6/site-packages/django/utils/decorators.py", line 93, in _wrapped_view
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]     response = view_func(request, *args, **kwargs)
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]   File "/usr/lib/python2.6/site-packages/django/views/defaults.py", line 31, in server_error
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]     return http.HttpResponseServerError(t.render(Context({})))
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]   File "/usr/lib/python2.6/site-packages/coffin/template/__init__.py", line 54, in render
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]     return super(Template, self).render(**context)
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]   File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 669, in render
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]     return self.environment.handle_exception(exc_info, True)
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]   File "/usr/lib/python2.6/site-packages/askbot/templates/500.html", line 1, in top-level template code
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]     {% extends "two_column_body.html" %}
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]   File "/usr/lib/python2.6/site-packages/askbot/templates/two_column_body.html", line 1, in top-level template code
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]     {% extends "base.html" %}
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]   File "/usr/lib/python2.6/site-packages/askbot/templates/base.html", line 4, in top-level template code
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]     <title>{% block title %}{% endblock %} - {{ settings.APP_TITLE|escape }}</title>
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]   File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 350, in getattr
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88]     return getattr(obj, attribute)
[Wed Jun 19 05:04:04 2013] [error] [client 10.5.126.88] UndefinedError: 'settings' is undefined
[Wed Jun 19 05:05:20 2013] [error] Starting with url: /upfiles/favicon_1.ico
[Wed Jun 19 05:05:20 2013] [error] Starting with url: style/extra.css
[Wed Jun 19 05:05:20 2013] [error] Starting with url: https://ask.stg.fedoraproject.org/upfiles/fedoraquestionslogo.png
[Wed Jun 19 05:05:20 2013] [error] Starting with url: /images/cc-by-sa.png

Thanks. If you do have time to write a hotfix, I'll be happy to test it out on the staging instance.