-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Api Endpoint returns wrong cultureinfo #16453
Comments
Hi there @seanhakbb! Firstly, a big thank you for raising this issue. Every piece of feedback we receive helps us to make Umbraco better. We really appreciate your patience while we wait for our team to have a look at this but we wanted to let you know that we see this and share with you the plan for what comes next.
We wish we could work with everyone directly and assess your issue immediately but we're in the fortunate position of having lots of contributions to work with and only a few humans who are able to do it. We are making progress though and in the meantime, we will keep you in the loop and let you know when we have any questions. Thanks, from your friendly Umbraco GitHub bot 🤖 🙂 |
Small update with more strange things relating to latest 13 lts release. We have also noticed this error in a custom controller as well now. This also affects dictionary values, however in this case it always try to load dictionaries using my machine default, en-US. Outside our custom controller all pages load fine, and when hardcoding culture values the right content is loaded (_variationContextAccessor.VariationContext = new VariationContext("en");) However we need to set CurrentThread.CurrentCulture to have dictionaries working. Another thing we noticed, Model.GetCultureFromDomains() seems to display the correct language in our views. |
Was related to this: 13.4.0 solved all our issues |
Which Umbraco version are you using? (Please write the exact version, example: 10.1.0)
13.3.2
Bug summary
Our API worked fine togheter with culture host binding and CultureInfo.CurrentCulture, with latest version this stopped working.
Specifics
In our old v13.1.0 our API worked fine using this setup:
Culture mapping:
domain.se => sv (swedish)
domain.dk => da (danish)
when accesing api via domain.se/api/endpoint, CultureInfo.CurrentCulture returned "sv" as expected
But with latest release (13.3.2) this now returns en-us, seemingly ignoring our culture binding.
Steps to reproduce
create site with two languages
domain.se => sv (swedish)
domain.dk => da (danish)
create an api endpoint that returns CultureInfo.CurrentCulture
Expected result / actual result
domain.se/api/endpoint should return "sv"
domain.dk/api/endpoint should return "dk"
domain.se/api/endpoint returns "en-us"
domain.dk/api/endpoint returns "en-us"
The text was updated successfully, but these errors were encountered: