Closed Bug 620093 Opened 14 years ago Closed 14 years ago

[traceback] UndefinedError: 'request' is undefined

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED
5.12.6

People

(Reporter: stephend, Assigned: jbalogh)

References

()

Details

(Keywords: regression, Whiteboard: [fromAutomation])

https://addons.allizom.org/mn/firefox/featured is throwing a traceback:

Traceback (most recent call last):

  File "/data/amo_python/www/preview/zamboni/vendor/src/django/django/core/handlers/base.py", line 109, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/amo_python/www/preview/zamboni/apps/browse/views.py", line 166, in extensions
    'search_cat': search_cat})

  File "/data/amo_python/www/preview/zamboni/vendor/src/jingo/jingo/__init__.py", line 78, in render
    rendered = render_to_string(request, template, context)

  File "/data/amo_python/www/preview/zamboni/vendor/src/jingo/jingo/__init__.py", line 96, in render_to_string
    return template.render(**get_context())

  File "/usr/lib/python2.6/site-packages/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)

  File "/data/amo_python/www/preview/zamboni/apps/browse/templates/browse/extensions.html", line 1, in top-level template code
    {% extends "browse/base_listing.html" %}

  File "/data/amo_python/www/preview/zamboni/apps/browse/templates/browse/base_listing.html", line 1, in top-level template code
    {% extends "base_side_categories.html" %}

  File "/data/amo_python/www/preview/zamboni/templates/base_side_categories.html", line 1, in top-level template code
    {% extends "base.html" %}

  File "/data/amo_python/www/preview/zamboni/templates/base.html", line 89, in top-level template code
    {% block main_content %}

  File "/data/amo_python/www/preview/zamboni/templates/base_side_categories.html", line 9, in block "main_content"
    {% block content %}{% endblock %}

  File "/data/amo_python/www/preview/zamboni/apps/browse/templates/browse/extensions.html", line 28, in block "content"
    {{ addon_listing_items(addons.object_list, src='category',

  File "/data/amo_python/www/preview/zamboni/vendor/src/jingo/jingo/__init__.py", line 135, in wrapper
    t = env.get_template(template).render(context)

  File "/usr/lib/python2.6/site-packages/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)

  File "/data/amo_python/www/preview/zamboni/apps/addons/templates/addons/listing/items.html", line 4, in top-level template code
    {% cache addons, extra=[collection, username] %}

  File "/data/amo_python/www/preview/zamboni/apps/amo/ext.py", line 22, in _cache_support
    return sup(key, obj, timeout, extra, caller)

  File "/data/amo_python/www/preview/zamboni/vendor/src/django-cache-machine/caching/ext.py", line 74, in _cache_support
    return caching.base.cached_with(obj, caller, key, timeout)

  File "/data/amo_python/www/preview/zamboni/vendor/src/django-cache-machine/caching/base.py", line 282, in cached_with
    return cached(f, key, timeout)

  File "/data/amo_python/www/preview/zamboni/vendor/src/django-cache-machine/caching/base.py", line 262, in cached
    val = function()

  File "/data/amo_python/www/preview/zamboni/apps/addons/templates/addons/listing/items.html", line 28, in template
    {{ performance_note(amount=addon.ts_slowness, listing=True) }}

  File "/data/amo_python/www/preview/zamboni/vendor/src/jingo/jingo/__init__.py", line 135, in wrapper
    t = env.get_template(template).render(context)

  File "/usr/lib/python2.6/site-packages/jinja2/environment.py", line 891, in render
    return self.environment.handle_exception(exc_info, True)

  File "/data/amo_python/www/preview/zamboni/apps/addons/templates/addons/performance_note.html", line 1, in top-level template code
    {% if listing and request.APP == amo.FIREFOX %}

  File "/usr/lib/python2.6/site-packages/jinja2/environment.py", line 371, in getattr
    return getattr(obj, attribute)

UndefinedError: 'request' is undefined
Assignee: nobody → thepotch
Whiteboard: [fromAutomation]
Target Milestone: --- → 5.12.6
http://github.com/jbalogh/zamboni/commit/6a51c42

Fixed, but I'm leaving this open to make sure we get some tests that hit the broken helper.
Assignee: thepotch → jbalogh
http://github.com/jbalogh/zamboni/commit/eea48c8
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Thx, Jeff; verified FIXED.
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.