HTTP 500 error with Potlach editor #4793
Comments
Author: TomH I've been unable to reproduce this so far, regardless of what I set my language settings to... |
Author: emj I can reproduce with language set to "sr", but only in potlatch2, with editor set to "potlatch1" it works nicely. On Linux, chrome 25 and FF. When was this working for you last time? Unrelated, this also throws application error: |
Author: TomH I've managed to find one of emj's attempts in the log - the error is:
which suggests that something went wrong in the locale selection. |
Author: TomH Specifically it means that this line:
must have failed to set locale to anything, despite the "en" fallback. One thing I do notice is that "sr" is a bit special as we don't have a mapping for it in the Potlatch list, because I wasn't sure which of "sr-EC" and "sr-EL" should be the default. To be honest neither of those codes seems valid anyway - the first would be "Serbian as spoke in Ecuador" and the second is nothing at all because there is no country with "EL" as it's code. It seems that what Potlatch 2 has as sr-ec is actually the cyrillic variant and sr-el is the latin variant... I will try updating our mappings to match that. |
Author: emj Both of them work if you set your preference to that value, sr_el is the latin version, sr_ec is the crylic version. I have some samples from the SWF files, if someone who speaks serbian wants to chip in:
http://cldr.unicode.org/translation/default-content States that it should be: Serbian (Cyrillic) [sr_Cyrl] or Serbian (Latin) [sr_Latn], with sr defaulting to Crylic. |
Author: TomH Yes I know what the codes should be, and the web site are ones are correct as "sr" and "sr-Latn". We don't bother with the "-Cyrl" because that is the default script. Potlatch 2 has it's own weird ideas though, possibly inherited from Flash, which is why we have a mapping table in lib/potlatch2.rb to fix things up. That is what I have just corrected. I still don't understand why you weren't just getting english though, which is what I was getting. Anyway, my fix should be live now if people want to test it... |
Author: metkos[at]gmail.com Replying to [comment:6 TomH]:
I did a test, your fix is fine. Potlach2 is now starting correctly with "sr,en-US,en" in preffered language settings. Editor's interface is mix of Serbian and English, but that's probably expected because of incomplete translation. Thank you. |
Reporter: metkos[at]gmail.com
[Submitted to the original trac issue database at 11.02pm, Friday, 22nd February 2013]
Using any component in OSM site is fine, but starting Potlach2 editor produce an HTTP 500 error:
Application error
The OpenStreetMap server encountered an unexpected condition that prevented it from fulfilling the request (HTTP 500)
Feel free to contact the OpenStreetMap community if your problem persists. Make a note of the exact URL / post data of your request.
This may be a problem in our Ruby On Rails code. 500 occurs with exceptions thrown outside of an action (like in Dispatcher setups or broken Ruby code)
I already found a cause. If I change "Preferred Languages" in OSM account settings and exclude serbian language ('sr') - P2 starts normally.
I tried croatian (hr) and russian (ru) on first place in that field, they do not
make problems. So to conclude, it is somehow connected to translations, serbian possibly.
People on IRC said that it is not connected to Potlach2, rather website itself.
Technical background:
auth = login or OpenID does not make a change;
browsers: tested with Firefox 19.x and Google Chrome;
OS: OpenSuse 12.2 x64
Cheers!
M.
The text was updated successfully, but these errors were encountered: