Closed
Bug 999102
Opened 12 years ago
Closed 12 years ago
[traceback] 500 Error when visiting $history URL with unicode characters
Categories
(developer.mozilla.org Graveyard :: General, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: mars, Unassigned)
References
()
Details
(Whiteboard: [specification][type:bug])
What did you do?
================
Visit https://developer.mozilla.org/es/docs/Talk:Gu%C3%ADa_JavaScript_1.5$history
What happened?
==============
500 Internal Server Error
What should have happened?
==========================
404? Not sure if this page exists.
Is there anything else we should know?
======================================
Traceback (most recent call last):
File "/usr/lib64/python2.6/site-packages/newrelic-1.13.1.31/newrelic/hooks/framework_django.py", line 475, in wrapper return wrapped(*args, **kwargs)
File "/data/www/developer.mozilla.org/kuma/vendor/src/django/django/views/decorators/http.py", line 41, in inner return func(request, *args, **kwargs)
File "/data/www/developer.mozilla.org/kuma/apps/wiki/views.py", line 139, in process return func(request, *args, **kwargs)
File "/data/www/developer.mozilla.org/kuma/apps/wiki/views.py", line 174, in _added_header response = func(request, *args, **kwargs)
File "/data/www/developer.mozilla.org/kuma/apps/wiki/views.py", line 1567, in document_revisions curr_id = doc.current_revision.id
AttributeError: 'NoneType' object has no attribute 'id'
See https://rpm.newrelic.com/accounts/263620/applications/3172075/traced_errors/1535381241
| Reporter | ||
Updated•12 years ago
|
Severity: normal → critical
Comment 1•12 years ago
|
||
Are there any other examples of history URLs with this error? I suspect the characters in the URL are not the issue.
The error is that the code assumes every document has a current revision - which should be a safe assumption. In this case, the document in question has zero revisions in the database. That shouldn't happen. So, this error might be a symptom of a different issue.
| Reporter | ||
Comment 2•12 years ago
|
||
This may be a naive question, but can we write a DB query against either the document or revision tables to find other documents without current revisions?
Comment 3•12 years ago
|
||
Assuming this is a decent query - it looks like we have 3 of them, including the doc cited by this bug.
https://developer.mozilla.org/es/docs/Talk:Gu%C3%ADa_JavaScript_1.5$history
https://developer.mozilla.org/zh-TW/docs/Project:開始動手$history
https://developer.mozilla.org/en-US/docs/Security/MixedContent/How_to_fix_a_website_with_blocked_mixed_content$history
Though, oddly, the last one in the en-US locale results in a 404 rather than a 500 error. Not yet sure why that is.
mysql> select locale, slug, current_revision_id from wiki_document where current_revision_id is null or current_revision_id not in (select id from wiki_revision);
+--------+-----------------------------------------------------------------------+---------------------+
| locale | slug | current_revision_id |
+--------+-----------------------------------------------------------------------+---------------------+
| zh-TW | Project:???? | NULL |
| es | Talk:Gu�a_JavaScript_1.5 | NULL |
| en-US | Security/MixedContent/How_to_fix_a_website_with_blocked_mixed_content | NULL |
+--------+-----------------------------------------------------------------------+---------------------+
3 rows in set (0.23 sec)
Comment 4•12 years ago
|
||
Commits pushed to master at https://github.com/mozilla/kuma
https://github.com/mozilla/kuma/commit/501543fe142c569534b61e2b2dd5b05a377ac535
fix bug 999102: Respond with 404 for $history where document has no revisions
https://github.com/mozilla/kuma/commit/8ae6e8102b639bbef1120c1b12a71165edc6aad7
Merge pull request #2315 from lmorchard/999102-history-error
fix bug 999102: Respond with 404 for $history where document has no revisions
Updated•12 years ago
|
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Updated•6 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
•