[traceback] NoReverseMatch on localized kbforums

VERIFIED FIXED in 2.8.4

Status

P1
major
VERIFIED FIXED
7 years ago
7 years ago

People

(Reporter: jsocol, Assigned: jsocol)

Tracking

unspecified
2.8.4

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Assignee)

Description

7 years ago
Looks to me like we're messing up a url() call heading into a {% trans %} block in kbforums/includes/macros.html.


Traceback (most recent call last):

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/support.mozilla.com/kitsune/apps/kbforums/views.py", line 78, in threads
    'feeds': feed_urls})

  File "/data/www/support.mozilla.com/kitsune/vendor/src/jingo/jingo/__init__.py", line 76, in render
    rendered = render_to_string(request, template, context)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/jingo/jingo/__init__.py", line 94, 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/www/support.mozilla.com/kitsune/apps/kbforums/templates/kbforums/threads.html", line 6, in top-level template code
    {% set crumbs = [(url('wiki.category', document.category), document.get_category_display()),

  File "/data/www/support.mozilla.com/kitsune/apps/kbforums/templates/kbforums/base.html", line 5, in top-level template code
    {% set scripts = ('forums',) %}

  File "/data/www/support.mozilla.com/kitsune/templates/base.html", line 90, in top-level template code
    {% block content %}{% endblock %}

  File "/data/www/support.mozilla.com/kitsune/apps/kbforums/templates/kbforums/threads.html", line 12, in block "content"
    {{ kbforums_warning(document, user) }}

  File "/data/www/support.mozilla.com/kitsune/apps/kbforums/templates/kbforums/includes/macros.html", line 19, in template
    {% trans title=document.title,

  File "/data/www/support.mozilla.com/kitsune/apps/sumo/helpers.py", line 48, in url
    return reverse(viewname, locale=locale, args=args, kwargs=kwargs)

  File "/data/www/support.mozilla.com/kitsune/apps/sumo/urlresolvers.py", line 51, in reverse
    url = django_reverse(viewname, urlconf, args, kwargs, prefix)

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/core/urlresolvers.py", line 391, in reverse
    *args, **kwargs)))

  File "/data/www/support.mozilla.com/kitsune/vendor/src/django/django/core/urlresolvers.py", line 337, in reverse
    "arguments '%s' not found." % (lookup_view_s, args, kwargs))

NoReverseMatch: Reverse for 'wiki.discuss.threads' with arguments '(Undefined,)' and keyword arguments '{}' not found.
(Assignee)

Comment 1

7 years ago
Ah, specifically, looks like we assume documents that aren't English have parents.
(Assignee)

Comment 2

7 years ago
https://github.com/jsocol/kitsune/commit/62905f981
Status: NEW → RESOLVED
Last Resolved: 7 years ago
Resolution: --- → FIXED
Duplicate of this bug: 658045
Verified on support-release that kb articles with no en-US parent do not generate errors when viewing the discussion tab
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.