Closed Bug 775241 Opened 12 years ago Closed 12 years ago

[traceback] NoReverseMatch: Reverse for 'wiki.document' with arguments '(u'',)' and keyword arguments '{}' not found

Categories

(developer.mozilla.org Graveyard :: Wiki pages, defect, P1)

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Assigned: lorchard)

References

()

Details

(Whiteboard: s=2012-08-01 p=1)

Hitting http://developer-new.mozilla.org/en-US/docs/en-US/, I get:

Traceback (most recent call last):

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/core/handlers/base.py", line 100, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django-waffle/waffle/decorators.py", line 20, in _wrapped_view
    return view(request, *args, **kwargs)

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/views/decorators/http.py", line 37, in inner
    return func(request, *args, **kwargs)

  File "/data/www/developer.mozilla.org/kuma/apps/wiki/views.py", line 152, in process
    args=[document_slug])

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

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/core/urlresolvers.py", line 351, in reverse
    *args, **kwargs)))

  File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/core/urlresolvers.py", line 297, in reverse
    "arguments '%s' not found." % (lookup_view_s, args, kwargs))

NoReverseMatch: Reverse for 'wiki.document' with arguments '(u'',)' and keyword arguments '{}' not found
I get a 404 doing this, fwiw.
Priority: -- → P1
Blocks: 771763
Hmm, I can reproduce this, and it looks like a bug in part of our legacy URL redirects. They don't expect a lack of a slug after the second locale in the URL.

https://github.com/mozilla/kuma/blob/master/apps/wiki/views.py#L150
Whiteboard: s=2012-08-01
Whiteboard: s=2012-08-01 → s=2012-08-01 p=1
Assignee: nobody → lorchard
Commits pushed to master at https://github.com/mozilla/kuma

https://github.com/mozilla/kuma/commit/703729816b5c727770982178a8f093123d1b6712
fix bug 775241: Missing slug after redirect processing should be a 404

https://github.com/mozilla/kuma/commit/df7eea9ad541906d79c134fc82b510dd2a04d0d9
Merge pull request #456 from lmorchard/bad-redirect-reverse-775241

fix bug 775241: Missing slug after redirect processing should be a 404
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Verified FIXED; now returns a 404:

[11:43:35.498] GET https://developer-dev.allizom.org/en-US/docs/en-US/ [HTTP/1.1 404 NOT FOUND 58ms]
Status: RESOLVED → VERIFIED
Version: Kuma → unspecified
Component: Website → Landing pages
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.