GetAllCultures Failes with 'Culture is not supported.'
Currently we struggle with the following API call which is performed by Umbraco:
umbraco/backoffice/umbracoapi/language/GetAllCultures
The response of the call is:
{
"ExceptionMessage": "Culture is not supported. (Parameter 'name')\r\naa is an invalid culture identifier.",
"ExceptionType": null,
"StackTrace": null
}
This call should return all available cultures like:
As far as I can see in the controller this code should be executed and nothing more right?:
[HttpGet]
public IDictionary<string, string> GetAllCultures()
=> CultureInfo.GetCultures(CultureTypes.AllCultures).DistinctBy(x => x.Name).OrderBy(x => x.EnglishName).ToDictionary(x => x.Name, x => x.EnglishName);
How can this controller endpoint ever fail?
Because it cannot retrieve any culture, we also cannot add any new ones via Umbraco. Currently we have one culture configured in the DB and it looks like this:
GetAllCultures Failes with 'Culture is not supported.'
Currently we struggle with the following API call which is performed by Umbraco: umbraco/backoffice/umbracoapi/language/GetAllCultures
The response of the call is:
This call should return all available cultures like:
As far as I can see in the controller this code should be executed and nothing more right?:
How can this controller endpoint ever fail?
Because it cannot retrieve any culture, we also cannot add any new ones via Umbraco. Currently we have one culture configured in the DB and it looks like this:
We just got the exact same issue on a site we are upgrading, what version of Umbraco are you working with?
Currently we are at version Umbraco version 10.5.0 in which we encountered this issue.
Hi _R, could you confirm what server OS you are using? so far I have only encountered the problem on Server2012
Hey Huw,
True, we encountered the problem on our Windows Server 2012 R2 Datacenter.
For now it looks like it has some trouble extracting cultures using IIS globalization:
Thanks for the information. MyTHDHR.com
Hi.
We noticed the same behavior on a Umbraco 12.1.1 installed and the package uskinnedSiteBuilder installed.
this is/was an OS issue, do you know what OS your site is running on?
is working on a reply...