Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#21826 closed Bug (fixed)

Forgot your password? "page unavailable"

Reported by: anonymous Owned by: nobody
Component: *.djangoproject.com Version: 1.6
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Link goes to: https://www.djangoproject.com/accounts/password/reset/

Which is returning:

Page unavailable

We're sorry, but the requested page is currently unavailable.

We're messing around with things internally, and the server had a bit of a hiccup.

Please try again later.

Change History (9)

comment:1 by Baptiste Mispelon, 10 years ago

Triage Stage: UnreviewedAccepted

I get the same error.

comment:2 by Tim Graham <timograham@…>, 10 years ago

Resolution: fixed
Status: newclosed

In 104e726d9a3e4df73f0471c3872379e738b1751c/djangoproject.com:

Fixed #21826 -- Updated password reset URL for Django 1.6

comment:3 by Baptiste Mispelon, 10 years ago

Resolution: fixed
Status: closednew

The problem is still there:

When you go to https://code.djangoproject.com/, there's a "Forgot your password?" link at the top that takes you to https://www.djangoproject.com/accounts/password/reset/.

That page shows a 500 error (our customized one anyway).

I can reproduce the error on my local install:

Environment:


Request Method: GET
Request URL: http://localhost:8000/accounts/password/reset/

Django Version: 1.6.1
Python Version: 2.7.6
Installed Applications:
['django.contrib.sites',
 'django.contrib.auth',
 'django.contrib.admin',
 'django.contrib.contenttypes',
 'django.contrib.flatpages',
 'django.contrib.humanize',
 'django.contrib.messages',
 'django.contrib.redirects',
 'django.contrib.sessions',
 'django.contrib.staticfiles',
 'django.contrib.sitemaps',
 'django_push.subscriber',
 'djangosecure',
 'registration',
 'south',
 'accounts',
 'aggregator',
 'blog',
 'cla',
 'contact',
 'docs',
 'legacy',
 'releases',
 'svntogit',
 'tracdb']
Installed Middleware:
['django.middleware.cache.UpdateCacheMiddleware',
 'djangosecure.middleware.SecurityMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
 'django.contrib.redirects.middleware.RedirectFallbackMiddleware',
 'django.middleware.cache.FetchFromCacheMiddleware']


Traceback:
File "./djangoproject.com/env2/lib/python2.7/site-packages/django/core/handlers/base.py" in get_response
  114.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "./djangoproject.com/env2/lib/python2.7/site-packages/django/utils/decorators.py" in _wrapped_view
  99.                     response = view_func(request, *args, **kwargs)
File "./djangoproject.com/env2/lib/python2.7/site-packages/django/contrib/auth/views.py" in password_reset
  142.         post_reset_redirect = reverse('password_reset_done')
File "./djangoproject.com/env2/lib/python2.7/site-packages/django/core/urlresolvers.py" in reverse
  509.     return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs))
File "./djangoproject.com/env2/lib/python2.7/site-packages/django/core/urlresolvers.py" in _reverse_with_prefix
  429.                              (lookup_view_s, args, kwargs, len(patterns), patterns))

Exception Type: NoReverseMatch at /accounts/password/reset/
Exception Value: Reverse for 'password_reset_done' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

comment:4 by Tim Graham, 10 years ago

I don't think anyone deployed the code I committed. We should try that and verify we get that same error message on the server.

comment:5 by Baptiste Mispelon, 10 years ago

Has patch: set

I looked deeper into the issue and it's not just a URLconf problem.

Django-registration is not compatible with Django 1.6 and that ends up creating a few issues:

1) django-registration's URLconf doesn't define a view named password_reset_done, which makes the auth.password_reset view fail (that's the traceback).
2) django-registration's URLconf uses the old uidb36 regexp but the view actually generates a new uidb64. This in turn generates invalid links in the email it sends out.

All this can be fixed by trying to use Django's stock URLconf for auth URLs before using django-registration's one.

The issue 2) I mentionned could pose a potential backwards-compatibility issue because in theory, we should support the invalid links that would have been generated. However, since issue 1) prevented the system from sending out any emails, there's no need to add support for that.

So here's the PR with my suggested changes: https://github.com/django/djangoproject.com/pull/71/.
I believe that should fix the issue (and it does on my local install) and it shouldn't break anything either (famous last words...).

comment:6 by Baptiste Mispelon <bmispelon@…>, 10 years ago

Resolution: fixed
Status: newclosed

In aa64079e3957ab16a03a7d8e88c74c53c4a6477d/djangoproject.com:

Fixed #21826 -- Fixed password reset views.

comment:7 by anonymous, 10 years ago

Has this been fixed git github but not deployed yet? I'm still getting the page unavailable on forgot password link...

comment:8 by Baptiste Mispelon, 10 years ago

Yes, that's exactly what's happening.

We had some changes in our server infrastructure and the new deploying workflow hasn't been ironed out completely, hence why it's taking some time.

I'll post a comment here when it's deployed.

comment:9 by Baptiste Mispelon, 10 years ago

FYI the fix got deployed today so everything should be back to normal now.

Note: See TracTickets for help on using tickets.
Back to Top