Closed
Bug 763498
Opened 12 years ago
Closed 12 years ago
MultipleObjectsReturned: get() returned more than one DocumentTag -- it returned 2! Lookup parameters were {'name': u'Testing'}
Categories
(developer.mozilla.org Graveyard :: Editing, defect, P2)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: groovecoder, Assigned: groovecoder)
References
Details
(Whiteboard: s= p=2)
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 626, in list_documents tag_obj = tag and get_object_or_404(DocumentTag, name=tag) or None File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/shortcuts/__init__.py", line 88, in get_object_or_404 return queryset.get(*args, **kwargs) File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/db/models/query.py", line 349, in get % (self.model._meta.object_name, num, kwargs)) MultipleObjectsReturned: get() returned more than one DocumentTag -- it returned 2! Lookup parameters were {'name': u'Testing'} <WSGIRequest GET:<QueryDict: {}>, POST:<QueryDict: {}>, COOKIES:{}, META:{ 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTPS': 'on', 'HTTP_ACCEPT': '*/*', 'HTTP_ACCEPT_ENCODING': 'gzip,deflate', 'HTTP_CONNECTION': 'Keep-alive', 'HTTP_FROM': 'googlebot(at)googlebot.com', 'HTTP_HOST': 'developer-new.mozilla.org', 'HTTP_SSLCLIENTCERTSTATUS': 'NoClientCert', 'HTTP_SSLCLIENTCIPHER': 'SSL_RSA_WITH_RC4_128_SHA, version=TLSv1, bits=128', 'HTTP_USER_AGENT': 'Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)', 'PATH_INFO': u'/en-US/docs/tag/Testing', 'PATH_TRANSLATED': '/data/www/developer.mozilla.org/kuma/wsgi/kuma.wsgi/en-US/docs/tag/Testing', 'QUERY_STRING': '', 'REMOTE_ADDR': '10.22.81.210', 'REMOTE_PORT': '64918', 'REQUEST_METHOD': 'GET', 'REQUEST_URI': '/en-US/docs/tag/Testing', 'SCRIPT_FILENAME': '/data/www/developer.mozilla.org/kuma/wsgi/kuma.wsgi', 'SCRIPT_NAME': u'', 'SCRIPT_URI': 'http://developer-new.mozilla.org/en-US/docs/tag/Testing', 'SCRIPT_URL': '/en-US/docs/tag/Testing', 'SERVER_ADDR': '10.22.81.18', 'SERVER_ADMIN': 'webmaster@mozilla.com', 'SERVER_NAME': 'developer-new.mozilla.org', 'SERVER_PORT': '80', 'SERVER_PROTOCOL': 'HTTP/1.1', 'SERVER_SIGNATURE': '', 'SERVER_SOFTWARE': 'Apache', 'mod_wsgi.application_group': 'developer.mozilla.org|', 'mod_wsgi.callable_object': 'application', 'mod_wsgi.handler_script': '', 'mod_wsgi.input_chunked': '0', 'mod_wsgi.listener_host': '', 'mod_wsgi.listener_port': '81', 'mod_wsgi.process_group': 'developer', 'mod_wsgi.request_handler': 'wsgi-script', 'mod_wsgi.script_reloading': '1', 'mod_wsgi.version': (3, 3), 'platform.name': 'developer1.webapp.scl3.mozilla.com', 'wsgi.errors': <mod_wsgi.Log object at 0x7f144b480df0>, 'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0x7f144b407738>, 'wsgi.input': <mod_wsgi.Input object at 0x7f144b480530>, 'wsgi.loaded': datetime.datetime(2012, 6, 10, 5, 48, 23, 668134), 'wsgi.multiprocess': True, 'wsgi.multithread': False, 'wsgi.run_once': False, 'wsgi.url_scheme': 'https', 'wsgi.version': (1, 1)}>
Comment 1•12 years ago
|
||
This might be related to something I saw last week: https://bugzilla.mozilla.org/show_bug.cgi?id=758377
Comment 2•12 years ago
|
||
Ugh. I suspect this has to do with case sensitivity. I wouldn't be surprised to see a "testing" and a "Testing" tag created, using case as-is. But, then a case-insensitive search used to look up a tag.
Comment 3•12 years ago
|
||
Resolved by Lucian here: https://bugzilla.mozilla.org/show_bug.cgi?id=758377 Thank you Lucian!
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Comment 4•12 years ago
|
||
This is still happening. Looks like the new code prevents new duplicate tags being created, but I don't think the existing duplicate tags that cause the error have been cleaned up and the code still trips up on them.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment 5•12 years ago
|
||
Shouldn't these be removed manually though, Les?
Comment 6•12 years ago
|
||
If there's only a couple, sure. Otherwise, we need a django-south migration to do the cleanup. I haven't looked into it - only noting that the error is still happening.
Comment 7•12 years ago
|
||
Hmm, looks like there's no admin view for Document tags. So, probably a good idea to add that, but no way to manually resolve the duplicate tags in the meantime. Need to build a South migration that inventories duplicate tags and deletes one of each.
Updated•12 years ago
|
Whiteboard: s=2012-07-18
Updated•12 years ago
|
Whiteboard: s=2012-07-18 → s=2012-07-18 p=2
Assignee | ||
Comment 9•12 years ago
|
||
https://github.com/mozilla/kuma/pull/363
Assignee: nobody → lcrouch
Comment 10•12 years ago
|
||
Commits pushed to master at https://github.com/mozilla/kuma https://github.com/mozilla/kuma/commit/4ddb10f24a35945a69f9f3c2bfc6581169b0ced5 fix bug 763498 - clean up document tags with dupe names https://github.com/mozilla/kuma/commit/07effbcbce259494cc606669bb5e4cfc4837f991 Merge pull request #363 from groovecoder/clean-documenttags-763498 fix bug 763498 - clean up document tags with dupe names
Updated•12 years ago
|
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Updated•12 years ago
|
Priority: -- → P2
Updated•12 years ago
|
Whiteboard: s=2012-07-18 p=2 → s= p=2
Comment 12•12 years ago
|
||
I think this is fixed now: http://developer-new.mozilla.org/en-US/docs/tag/Testing
Status: REOPENED → RESOLVED
Closed: 12 years ago → 12 years ago
Resolution: --- → FIXED
Updated•12 years ago
|
Version: Kuma → unspecified
Updated•12 years ago
|
Component: Docs Platform → Editing
Updated•4 years ago
|
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•