[traceback] UndefinedError: 'request' is undefined

VERIFIED FIXED in 5.12.6

Status

addons.mozilla.org Graveyard
Public Pages
--
major
VERIFIED FIXED
7 years ago
2 years ago

People

(Reporter: stephend, Assigned: jbalogh)

Tracking

({regression})

unspecified
5.12.6
regression

Details

(Whiteboard: [fromAutomation], URL)

(Reporter)

Description

7 years ago
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
(Reporter)

Comment 1

7 years ago
Sorry, this is on preview only; https://addons.mozilla.org/mn/firefox/featured is fine, so downgrading.
(Assignee)

Updated

7 years ago
Assignee: nobody → thepotch
(Reporter)

Updated

7 years ago
Whiteboard: [fromAutomation]
(Assignee)

Updated

7 years ago
Target Milestone: --- → 5.12.6
(Assignee)

Comment 2

7 years ago
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
(Assignee)

Comment 3

7 years ago
http://github.com/jbalogh/zamboni/commit/eea48c8
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
(Reporter)

Comment 4

7 years ago
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.