Closed Bug 731470 Opened 12 years ago Closed 12 years ago

500 error / exception browsing around, while logged in with an incomplete profile

Categories

(Websites :: Firefox Flicks, defect)

defect
Not set
normal

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Unassigned)

References

Details

This only seems to apply against staging; see screencast: http://screencast.com/t/TaQEafJI

STR:

1. Log in via BrowserID on staging, with email address "stephen.donner@gmail.com" -- my profile isn't yet completed
2. Click around

Actual:

[17:35:44.081] GET https://firefoxflicks.allizom.org/en-US/recent [HTTP/1.1 500 INTERNAL SERVER ERROR 318ms]

(I don't yet have the stack trace, either, sorry!)
Traceback (most recent call last):

  File "/data/www/firefoxflicks.allizom.org/firefox-flicks/vendor/src/django/django/core/handlers/base.py", line 111, in get_response
    response = callback(request, *callback_args, **callback_kwargs)

  File "/data/www/firefoxflicks.allizom.org/firefox-flicks/flicks/videos/views.py", line 62, in recent
    return render(request, 'videos/recent.html', d)

  File "/data/www/firefoxflicks.allizom.org/firefox-flicks/vendor/src/django/django/shortcuts/__init__.py", line 44, in render
    return HttpResponse(loader.render_to_string(*args, **kwargs),

  File "/data/www/firefoxflicks.allizom.org/firefox-flicks/vendor/src/django/django/template/loader.py", line 188, in render_to_string
    return t.render(context_instance)

  File "/data/www/firefoxflicks.allizom.org/firefox-flicks/vendor/src/jingo/jingo/__init__.py", line 166, in render
    return self.template.render(context_dict)

  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/firefoxflicks.allizom.org/firefox-flicks/flicks/videos/templates/videos/recent.html", line 7, in top-level template code
    {% set title=_('Videos') %}

  File "/data/www/firefoxflicks.allizom.org/firefox-flicks/flicks/base/templates/base.html", line 46, in top-level template code
    {% block userbar %}

  File "/data/www/firefoxflicks.allizom.org/firefox-flicks/flicks/base/templates/base.html", line 49, in block "userbar"
    {% block titlebar %}

  File "/data/www/firefoxflicks.allizom.org/firefox-flicks/flicks/base/templates/base.html", line 54, in block "titlebar"
    <span class="title">{{ user.userprofile.full_name }}</span>

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

  File "/data/www/firefoxflicks.allizom.org/firefox-flicks/vendor/src/django/django/utils/functional.py", line 277, in __getattr__
    return getattr(self._wrapped, name)

  File "/data/www/firefoxflicks.allizom.org/firefox-flicks/vendor/src/django/django/db/models/fields/related.py", line 239, in __get__
    rel_obj = self.related.model._base_manager.using(db).get(**params)

  File "/data/www/firefoxflicks.allizom.org/firefox-flicks/vendor/src/django/django/db/models/query.py", line 349, in get
    % self.model._meta.object_name)

DoesNotExist: UserProfile matching query does not exist.
Fixed in https://github.com/mozilla/firefox-flicks/commit/b9536b0adde7b338b03cce2a25e25d73936f5a99

Reproduced on firefoxflicks-dev, and fixed on there for now until we push stage.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Can this be pushed to develop, or whatever, and then pushed to stage?
Verified FIXED; this is now working for me: [13:39:39.922] GET https://firefoxflicks.allizom.org/en-US/recent [HTTP/1.1 200 OK 152ms]
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.