Closed Bug 768524 Opened 13 years ago Closed 13 years ago

DoesNotExist: User matching query does not exist.

Categories

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

defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: stephend, Assigned: groovecoder)

References

()

Details

(Whiteboard: u=user c=wiki s=2012-07-25 p=3)

https://developer-new.mozilla.org/ru/docs/Project:%D0%9A%D0%B0%D0%BA_%D0%BF%D0%BE%D0%BC%D0%BE%D1%87%D1%8C$history triggers: 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 155, in process return func(request, *args, **kwargs) File "/data/www/developer.mozilla.org/kuma/apps/wiki/views.py", line 1097, in document_revisions {'revisions': revs_out, 'document': doc}) File "/data/www/developer.mozilla.org/kuma/vendor/src/jingo/jingo/__init__.py", line 78, in render rendered = render_to_string(request, template, context) File "/data/www/developer.mozilla.org/kuma/vendor/src/jingo/jingo/__init__.py", line 96, in render_to_string return template.render(**get_context()) File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 891, in render return self.environment.handle_exception(exc_info, True) File "/data/www/developer.mozilla.org/kuma/apps/wiki/templates/wiki/document_revisions.html", line 5, in top-level template code {% set crumbs = [(url('wiki.category', document.category), document.get_category_display()), File "/data/www/developer.mozilla.org/kuma/apps/wiki/templates/wiki/base.html", line 12, in top-level template code {% set scripts = ('wiki',) %} File "/data/www/developer.mozilla.org/kuma/templates/base.html", line 153, in top-level template code {% block content %}{% endblock %} File "/data/www/developer.mozilla.org/kuma/apps/wiki/templates/wiki/document_revisions.html", line 77, in block "content" {{ rev.creator }} File "/usr/lib64/python2.6/site-packages/jinja2/environment.py", line 371, in getattr return getattr(obj, attribute) File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/db/models/fields/related.py", line 313, in __get__ rel_obj = QuerySet(self.field.rel.to).using(db).get(**params) File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/db/models/query.py", line 347, in get % self.model._meta.object_name) DoesNotExist: User matching query does not exist.
Whiteboard: u=user c=wiki s=2012-07-18 p=
Whiteboard: u=user c=wiki s=2012-07-18 p= → u=user c=wiki s=2012-07-18 p=2
Whiteboard: u=user c=wiki s=2012-07-18 p=2 → u=user c=wiki s=2012-07-18 p=3
I suspect this might be a symptom of a larger bug, possibly related to bug 769129. The content on this page is missing altogether, making me think maybe migration failed for this particular page: https://developer-new.mozilla.org/ru/docs/Project:%D0%9A%D0%B0%D0%BA_%D0%BF%D0%BE%D0%BC%D0%BE%D1%87%D1%8C
Seems like we'll need to re-run the migration script again next week to fix some things?
(In reply to Luke Crouch [:groovecoder] from comment #2) > Seems like we'll need to re-run the migration script again next week to fix > some things? Yes, but only after taking a look at it to see if/why if failed on these documents. Just running it again without some investigation will probably result in the same issue
Blocks: 771763
Priority: -- → P1
Whiteboard: u=user c=wiki s=2012-07-18 p=3 → u=user c=wiki s= p=3
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: nobody → lcrouch
Whiteboard: u=user c=wiki s= p=3 → u=user c=wiki s=2012-07-25 p=3
I think this error is fixed, after running some SQL to correct the 469 revisions that pointed at non-existent users. https://developer-new.mozilla.org/en-US/docs/JavaScript/Reference$history :groovecoder is also working on some defensive coding to avoid this error. It shouldn't happen again, since we think it was caused by a migration crash that we've since fixed in the code. It shouldn't come up in normal operation of the site
In case anyone's interested, this is what I did: http://pastebin.mozilla.org/1713334
Status: REOPENED → RESOLVED
Closed: 13 years ago13 years ago
Resolution: --- → FIXED
(In reply to Les Orchard [:lorchard] from comment #8) > I think this error is fixed, after running some SQL to correct the 469 > revisions that pointed at non-existent users. > > https://developer-new.mozilla.org/en-US/docs/JavaScript/Reference$history Awesome! > :groovecoder is also working on some defensive coding to avoid this error. Awesome! Glad to see code quality isn't being sacrificed to save time. Lots of teams let the technical debt pile up towards the end -- and it often comes back to bite them. Glad we aren't doing the same here.
Verified FIXED on [11:53:17.601] GET https://developer-new.mozilla.org/ru/docs/Project:%D0%9A%D0%B0%D0%BA_%D0%BF%D0%BE%D0%BC%D0%BE%D1%87%D1%8C$history [HTTP/1.1 200 OK 133ms] and the other URL(s) here.
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.