Closed
Bug 597468
Opened 15 years ago
Closed 15 years ago
Unknown locale stack traces for 'oc' and 'fy-NL' in _format_decimal
Categories
(support.mozilla.org :: Localization, task)
support.mozilla.org
Localization
Tracking
(Not tracked)
VERIFIED
FIXED
2.2.5
People
(Reporter: paulc, Assigned: paulc)
References
()
Details
Attachments
(1 file)
765.99 KB,
image/png
|
Details |
I've successfully reproed this and hope it's an easy fix. Would be nice to cut down on stack traces we get, and actually allow people to ask questions in the e.g. "oc" locale.
To reproduce this, you must POST the form at this URL, when logged in:
http://support.mozilla.com/oc/questions/new?product=desktop&category=d6&search=My+link+roll-over+tags%2Fflags+are+missing&showform=1
ER: 500 error
AR: posting form successfully...
Traceback (most recent call last):
File "/data/virtualenvs/kitsune/src/django/django/core/handlers/base.py", line 100, in get_response
response = callback(request, *callback_args, **callback_kwargs)
File "/data/www/support.mozilla.com/kitsune/apps/questions/views.py", line 182, in new_question
if form.is_valid():
File "/data/virtualenvs/kitsune/src/django/django/forms/forms.py", line 121, in is_valid
return self.is_bound and not bool(self.errors)
File "/data/virtualenvs/kitsune/src/django/django/forms/forms.py", line 112, in _get_errors
self.full_clean()
File "/data/virtualenvs/kitsune/src/django/django/forms/forms.py", line 267, in full_clean
self._clean_fields()
File "/data/virtualenvs/kitsune/src/django/django/forms/forms.py", line 284, in _clean_fields
value = field.clean(value)
File "/data/www/support.mozilla.com/kitsune/apps/sumo/form_fields.py", line 39, in clean
return super(StrippedCharField, self).clean(value)
File "/data/virtualenvs/kitsune/src/django/django/forms/fields.py", line 164, in clean
self.run_validators(value)
File "/data/virtualenvs/kitsune/src/django/django/forms/fields.py", line 143, in run_validators
v(value)
File "/data/www/support.mozilla.com/kitsune/apps/sumo/form_fields.py", line 46, in __call__
params = {'limit_value': _format_decimal(self.limit_value),
File "/data/www/support.mozilla.com/kitsune/apps/sumo/form_fields.py", line 68, in _format_decimal
locale = Locale(translation.to_locale(lang))
File "/data/virtualenvs/kitsune/lib/python2.6/site-packages/babel/core.py", line 137, in __init__
raise UnknownLocaleError(identifier)
UnknownLocaleError: unknown locale 'oc'
<WSGIRequest
GET:<QueryDict: {u'category': [u'd6'], u'showform': [u'1'], u'product': [u'desktop'], u'search': [u'My link roll-over tags/flags are missing']}>,
POST:<QueryDict: {u'title': [u'My link roll-over tags/flags are missing'], u'started': [u'After an update some time last week'], u'content': [u'I updated Firefox last week, and again today. When I roll-over a link, there is no longer a little tag/flag that provides information about what the website links to. The status bar will give the actual web address, but the tag/flag used to give the "title" or the first line (if it was a forum posting). I still get a little yellow colored tag/flag, but it\'s empty and just appears as a little box. '], u'frequency': [u'EVERY_TIME'], u'troubleshooting': [u"I've tried removing toolbars, plug-ins, and add-ons; all without any success."], u'plugins': [u'* Gecko default plugin\r\n* Runs Java applets using the latest installed versions of Java. For more information: Java Embedding Plugin. Run version test: Java Information.\r\n* npmnqmp 071701000001\r\n* iPhoto6\r\n* The Flip4Mac WMV Plugin allows you to view Windows Media content using QuickTime.\r\n* Adobe Shockwave for Director Netscape plug-in, version 11.0.3\r\n* Office Live Update v1.0\r\n* Java Plug-In 2 for NPAPI Browsers\r\n* The QuickTime Plugin allows you to view a wide variety of multimedia content in web pages. For more information, visit the QuickTime Web site.\r\n* Shockwave Flash 10.1 r82'], u'useragent': [u'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 GTB7.1'], u'csrfmiddlewaretoken': [u'0db505a2e5440c72ed117864748c9ad8'], u'ff_version': [u'3.6.10'], u'os': [u'Mac OS X 10.6']}>,
COOKIES:{'SSID_SUMO': 'AwBIsikAAAAAj_12TFUeBgGP_XZMAgBbzpJMAAAAAAAAAABbzpJMAQAzAAAAxAAAAAI',
'SSLB_SUMO': '1',
'SSRT': 'W86STAE',
'SSSC_SUMO': '3.G5509869984773709397.2.51.196',
'SUMOloggedin': 'true',
'SUMOv1': 'phtmcf00fd8dj8i71nq5bfif14',
'WT_FPC': 'id=67.242.147.164-1867056256.30085864:lv=1284675344976:ss=1284674796746',
'csrftoken': '0db505a2e5440c72ed117864748c9ad8',
'sessionid': 'a9854e00671747a0452ef658655bf480',
'wtspl': '523214'},
META:{'CONTENT_LENGTH': '1520',
'CONTENT_TYPE': 'application/x-www-form-urlencoded',
'CSRF_COOKIE': '0db505a2e5440c72ed117864748c9ad8',
'DOCUMENT_ROOT': '/data/www/support.mozilla.com/webroot',
'GATEWAY_INTERFACE': 'CGI/1.1',
'HTTPS': 'on',
'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.7',
'HTTP_ACCEPT_ENCODING': 'gzip,deflate',
'HTTP_ACCEPT_LANGUAGE': 'en-us,en;q=0.5',
'HTTP_CONNECTION': 'keep-alive',
'HTTP_COOKIE': 'WT_FPC=id=67.242.147.164-1867056256.30085864:lv=1284675344976:ss=1284674796746; SSID_SUMO=AwBIsikAAAAAj_12TFUeBgGP_XZMAgBbzpJMAAAAAAAAAABbzpJMAQAzAAAAxAAAAAI; SSRT=W86STAE; wtspl=523214; SSLB_SUMO=1; SSSC_SUMO=3.G5509869984773709397.2.51.196; csrftoken=0db505a2e5440c72ed117864748c9ad8; SUMOv1=phtmcf00fd8dj8i71nq5bfif14; SUMOloggedin=true; sessionid=a9854e00671747a0452ef658655bf480',
'HTTP_HOST': 'support.mozilla.com',
'HTTP_KEEP_ALIVE': '115',
'HTTP_REFERER': 'https://support.mozilla.com/oc/questions/new?product=desktop&category=d6&search=My+link+roll-over+tags%2Fflags+are+missing&showform=1',
'HTTP_SSLCLIENTCERTSTATUS': 'NoClientCert',
'HTTP_SSLCLIENTCIPHER': 'SSL_RSA_WITH_RC4_128_SHA, version=TLSv1, bits=128',
'HTTP_SSLSESSIONID': '6E0400A851A975C325F48C7CA7C6A591D786D64E4883FE020067FE8436AF8566',
'HTTP_USER_AGENT': 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.6; en-US; rv:1.9.2.10) Gecko/20100914 Firefox/3.6.10 GTB7.1',
'HTTP_X_CLUSTER_CLIENT_IP': '67.242.147.164',
'HTTP_X_FORWARDED_FOR': '67.242.147.164',
'PATH_INFO': u'/oc/questions/new',
'PATH_TRANSLATED': 'redirect:/k/oc/questions/new/questions/new',
'QUERY_STRING': 'product=desktop&category=d6&search=My+link+roll-over+tags%2Fflags+are+missing&showform=1',
'REDIRECT_HTTPS': 'on',
'REDIRECT_QUERY_STRING': 'product=desktop&category=d6&search=My+link+roll-over+tags%2Fflags+are+missing&showform=1',
'REDIRECT_SCRIPT_URI': 'http://support.mozilla.com/oc/questions/new',
'REDIRECT_SCRIPT_URL': '/oc/questions/new',
'REDIRECT_STATUS': '200',
'REDIRECT_URL': '/oc/questions/new',
'REDIRECT_is-forwarded': '1',
'REMOTE_ADDR': '10.2.81.100',
'REMOTE_PORT': '38295',
'REQUEST_METHOD': 'POST',
'REQUEST_URI': '/oc/questions/new?product=desktop&category=d6&search=My+link+roll-over+tags%2Fflags+are+missing&showform=1',
'SCRIPT_FILENAME': '/data/www/support.mozilla.com/kitsune/wsgi/kitsune.wsgi',
'SCRIPT_NAME': u'',
'SCRIPT_URI': 'http://support.mozilla.com/oc/questions/new',
'SCRIPT_URL': '/oc/questions/new',
'SERVER_ADDR': '10.2.81.71',
'SERVER_ADMIN': 'webmaster@mozilla.com',
'SERVER_NAME': 'support.mozilla.com',
'SERVER_PORT': '80',
'SERVER_PROTOCOL': 'HTTP/1.1',
'SERVER_SIGNATURE': '',
'SERVER_SOFTWARE': 'Apache',
'is-forwarded': '1',
'mod_wsgi.application_group': 'support.mozilla.com|/k',
'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': 'kitsune-ssl',
'mod_wsgi.request_handler': 'wsgi-script',
'mod_wsgi.script_reloading': '1',
'mod_wsgi.version': (3, 2),
'wsgi.errors': <mod_wsgi.Log object at 0xafc2598>,
'wsgi.file_wrapper': <built-in method file_wrapper of mod_wsgi.Adapter object at 0xae70d10>,
'wsgi.input': <mod_wsgi.Input object at 0xafc2160>,
'wsgi.loaded': datetime.datetime(2010, 9, 16, 12, 27, 28, 679529),
'wsgi.multiprocess': True,
'wsgi.multithread': True,
'wsgi.run_once': False,
'wsgi.url_scheme': 'https',
'wsgi.version': (1, 1)}>
Comment 1•15 years ago
|
||
At the very least, oc and fy_NL are not in Babel. I hate to ask this, but how much content do we actually have in those two locales?
Assignee | ||
Comment 2•15 years ago
|
||
Either way, we need to be friendlier about the _format_decimal fallback. Fixed that:
http://github.com/jsocol/kitsune/commit/3497ee646c86036bb4feb1e43dadc84d8406415c
Once again, for QA: this happens when trying to post a question in the locales mentioned.
Status: NEW → RESOLVED
Closed: 15 years ago
Resolution: --- → FIXED
Summary: Unknown locale stack traces in question form validation → Unknown locale stack traces for 'oc' and 'fy-NL' in _format_decimal
Assignee | ||
Comment 3•15 years ago
|
||
Sorry, the above commit was on master. Don't think it's worth getting this in to 2.2.5, since the cherry pick wasn't straightforward (tests failed).
Target Milestone: 2.2.5 → 2.3
Comment 4•15 years ago
|
||
Based on the number of stack traces this week I think we need to take the time to back port this to 2.2.5.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Target Milestone: 2.3 → 2.2.5
Assignee | ||
Comment 5•15 years ago
|
||
Status: REOPENED → RESOLVED
Closed: 15 years ago → 15 years ago
Resolution: --- → FIXED
Comment 6•15 years ago
|
||
Verified FIXED on http://support-stage.mozilla.com/oc/questions/new?product=desktop&category=d6&search=My+link+roll-over+tags%2Fflags+are+missing&showform=1.
Status: RESOLVED → VERIFIED
Comment 7•15 years ago
|
||
You need to log in
before you can comment on or make changes to this bug.
Description
•