id,summary,reporter,owner,description,type,status,component,version,severity,resolution,keywords,cc,stage,has_patch,needs_docs,needs_tests,needs_better_patch,easy,ui_ux 18225,Staticfiles template tag does not fail silently,Bouke Haarsma,Moritz Sichert,"Last night we had a major outage on our site, due to a missing static file. We used `{% static 'css/fancybox.jquery.css' %}` in our base template, but that file had gone missing. As there were some caches involved, the problem presented only a few hours later when the caches expired. From what I understand is that template tags should fail silently as per the docs: [[BR]] [[BR]] > render() should never raise TemplateSyntaxError or any other exception. It should fail silently, just as template filters should. [[BR]] So I was surprised that instead of failing silently, the template tag raised an exception (and brought the whole site to a stop). I think the template tag should fail silently instead of raising the exception. {{{ File ""app/local/lib/python2.7/site-packages/django/core/handlers/base.py"", line 136, in get_response response = response.render() File ""app/local/lib/python2.7/site-packages/django/template/response.py"", line 104, in render self._set_content(self.rendered_content) File ""app/local/lib/python2.7/site-packages/django/template/response.py"", line 81, in rendered_content content = template.render(context) File ""app/local/lib/python2.7/site-packages/django/template/base.py"", line 140, in render return self._render(context) File ""app/local/lib/python2.7/site-packages/django/template/base.py"", line 134, in _render return self.nodelist.render(context) File ""app/local/lib/python2.7/site-packages/django/template/base.py"", line 823, in render bit = self.render_node(node, context) File ""app/local/lib/python2.7/site-packages/django/template/base.py"", line 837, in render_node return node.render(context) File ""app/local/lib/python2.7/site-packages/django/template/loader_tags.py"", line 123, in render return compiled_parent._render(context) File ""app/local/lib/python2.7/site-packages/django/template/base.py"", line 134, in _render return self.nodelist.render(context) File ""app/local/lib/python2.7/site-packages/django/template/base.py"", line 823, in render bit = self.render_node(node, context) File ""app/local/lib/python2.7/site-packages/django/template/base.py"", line 837, in render_node return node.render(context) File ""app/local/lib/python2.7/site-packages/django/template/base.py"", line 1107, in render return func(*resolved_args, **resolved_kwargs) File ""app/local/lib/python2.7/site-packages/django/contrib/staticfiles/templatetags/staticfiles.py"", line 13, in static return staticfiles_storage.url(path) File ""app/config/storages.py"", line 40, in url url = super(StaticStorage, self).url(name, force) File ""app/local/lib/python2.7/site-packages/django/contrib/staticfiles/storage.py"", line 114, in url hashed_name = self.hashed_name(clean_name).replace('\\', '/') File ""app/local/lib/python2.7/site-packages/django/contrib/staticfiles/storage.py"", line 74, in hashed_name (clean_name, self)) ValueError: The file 'styles/jquery.fancybox.css' could not be found with . }}}",Bug,closed,contrib.staticfiles,1.4,Normal,wontfix,,moritz.sichert@…,Accepted,1,0,0,0,1,0