You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which exact Umbraco version are you using? For example: 9.0.1 - don't just write v9
10.1
Bug summary
When creating content with a decimal value using one culture and a Sqlite database, when switching cultures to one with a different decimal separator/group separator, the value displayed is not correct.
This issue was originally reported and is shown in this Umbraco Deploy issue, but likely the fix should be in CMS if it's possible as it can be replicated in other scenarios.
Specifics
I'm pretty sure the issue stems from using a TEXT data type for decimals rather than REAL. This was changed in this PR, seemingly for good reason. But coincidentally I had a database from prior to this change and I didn't see the problem in that.
I can see in SQLite Studio the value is stored as "123.0".
So this makes some sense, in that when loading this value under Danish culture, the "." would be considered as a numeric grouping separator leading to a value of "1230", which is what we see in the back-office when following the steps described below.
There's something confusing though. If I create the content using the Danish culture, it's presented correctly under the Danish culture. BUT if I look in the database, the value stored is still 123.0 (i.e. with a "." as the decimal separator). So I don't understand why that displays OK. Seemingly it's the same value that displays incorrectly if you switch cultures.
Steps to reproduce
Start using an en-US locale. This can be done via regional settings or (more easily) by adding the following code to the Startup.Configure() method.
var cultureInfo = new CultureInfo("en-US");
CultureInfo.DefaultThreadCurrentCulture = cultureInfo;
CultureInfo.DefaultThreadCurrentUICulture = cultureInfo;
Create a document type containing a property based on the decimal data type.
Create a content item and enter the value "123".
Amend the code above to use the Danish culture "da-DK"
Restart the application and note that the value is displayed as "1230"
Expected result / actual result
Should display the same across all cultures.
The text was updated successfully, but these errors were encountered:
Which exact Umbraco version are you using? For example: 9.0.1 - don't just write v9
10.1
Bug summary
When creating content with a decimal value using one culture and a Sqlite database, when switching cultures to one with a different decimal separator/group separator, the value displayed is not correct.
This issue was originally reported and is shown in this Umbraco Deploy issue, but likely the fix should be in CMS if it's possible as it can be replicated in other scenarios.
Specifics
I'm pretty sure the issue stems from using a TEXT data type for decimals rather than REAL. This was changed in this PR, seemingly for good reason. But coincidentally I had a database from prior to this change and I didn't see the problem in that.
I can see in SQLite Studio the value is stored as "123.0".
So this makes some sense, in that when loading this value under Danish culture, the "." would be considered as a numeric grouping separator leading to a value of "1230", which is what we see in the back-office when following the steps described below.
There's something confusing though. If I create the content using the Danish culture, it's presented correctly under the Danish culture. BUT if I look in the database, the value stored is still 123.0 (i.e. with a "." as the decimal separator). So I don't understand why that displays OK. Seemingly it's the same value that displays incorrectly if you switch cultures.
Steps to reproduce
Startup.Configure()
method.Expected result / actual result
Should display the same across all cultures.
The text was updated successfully, but these errors were encountered: