Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Invalid field value for field - system language and formatting of lat/lon #110

Open
wkulesza opened this issue Nov 29, 2024 · 1 comment

Comments

@wkulesza
Copy link

Hi,
great work on the docker. We succesfully run it and it will be powering our standard OBA deployments.
We noticed a strange behaviour linked to differences in how OBA ios treats formatting of lat/lon included in endpoints produced by oba docker.
When ios app (setup with any other language than english - i.e. polish, german) sends requests:
api/where/stops-for-location.json?lon=16.903518751776243&latSpan=0.00919621834986728&lat=52.36105449372918&lonSpan=0.009276089134189647&version=2&app_ver=24.3.1&key=web&app_uid=215BB071-58FF-41C7-AC51-A184CBB7B4FA

it's getting an error:
obraz

When we replace the . with , for lat/lon/latspan/lonspan, it works again:
api/where/stops-for-location.json?lon=16,903518751776243&latSpan=0,00919621834986728&lat=52,36105449372918&lonSpan=0,009276089134189647&version=2&app_ver=24.3.1&key=web&app_uid=215BB071-58FF-41C7-AC51-A184CBB7B4FA

To debug the error in ios, try opening any OBA endpoint in xcode and start emulator (dont use english language).

@wkulesza
Copy link
Author

ok, we found a solution/fix for anybody that runs this outside of the US (with different language than english).What works for us is adding the following directive to virtualhost settings of Apache server:
RequestHeader set Accept-Language "en-US"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant