I have…
- [x] Read the following guideline: https://docs.squidex.io/01-getting-started/installation/troubleshooting-and-support. I understand that my support request might get deleted if I do not follow the guideline.
I’m submitting a…
- [ ] Regression (a behavior that stopped working in a new release)
- [ ] Bug report
- [ ] Performance issue
- [x] Documentation issue or request
Current behavior
When requesting a single language that is not a member of Squidex.Infrastructure.Language
(Languages.cs) using the X-Languages
and X-Flatten
headers against the content/{app}/{schema}/{id}/
endpoint, all languages are returned.
Expected behavior
Only the master fallback language would be returned and the data would be flattened.
Minimal reproduction of the problem
Pass “foo” as the language code (or de-BR).
Environment
App Name: n/a
- [ ] Self hosted with docker
- [ ] Self hosted with IIS
- [x] Self hosted with other version
- [ ] Cloud version
Version: Master branch at commit: 373d05f74076ee1f4d70e38e262ed90d8c3d7efe
Browser:
- [ ] Chrome (desktop)
- [ ] Chrome (Android)
- [ ] Chrome (iOS)
- [ ] Firefox
- [ ] Safari (desktop)
- [ ] Safari (iOS)
- [ ] IE
- [ ] Edge
Others:
Running the latest master branch from this morning (15/04/2022) locally from Rider and using Postman for the requests. Wondering why Squidex.Domain.Apps.Entities.Contents.ContentExtensions.Languages
doesn’t add the App
's master language if it finds no matching ISO language for the requested language code.
I realize this is highly unlikely, I noticed it using “foo” as the language code to test what happens if an unconfigured code is supplied but now realize this behavior is only if the code is not in the LanguageByCode
Dictionary so apologies if this is a distraction, I assume all the codes supported by the major browsers are in the list.
There is a minor (near impossible) risk of a language code that is missing from the list being supplied (I don’t have a specific language in mind, Brazilian German just happens to not have an ISO code so I mention it, I won’t actually need it and assume the major browsers won’t have it) so more asking out of curiosity. If it did happen though, the client would have to handle the unflattened data and act accordingly.