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
Slider only allows integers. Trying to update priority results in error with "The JSON value could not be converted to System.Int32. Path: $.from | LineNumber: 0 | BytePositionInLine: 11.
A fatal server error occurred. If this continues, please reach out to your administrator."
I resolved the issue by changing the range to 1 to 10, and updating the template to var priority = double.Parse(node.HasValue("searchEngineRelativePriority") ? node.Value<string>("searchEngineRelativePriority") : "5")/10;
The text was updated successfully, but these errors were encountered:
I've now finally had a chance to test this.
It seems that it continues to work as expected with the decimals in Umbraco 13.
When testing with Umbraco 14 however, I'm running into the exact same issue as you describe.
The workaround with not using decimal is definitely valid, however, I do think we should report this to the CMS team.
Since it's something that has worked in previous versions, it should also work on the latest.
I'll take it from here! Thanks again for reporting this 💪
What type of issue is it? (Choose one - delete the others)
Discussion
not sure if this is an issue with documentation or a bug to be fixed. Slider only accepts integers and this documentation is using doubles.
What article/section is this about?
https://docs.umbraco.com/umbraco-cms/tutorials/creating-an-xml-site-map
Describe the issue
Slider only allows integers. Trying to update priority results in error with "The JSON value could not be converted to System.Int32. Path: $.from | LineNumber: 0 | BytePositionInLine: 11.
A fatal server error occurred. If this continues, please reach out to your administrator."
I resolved the issue by changing the range to 1 to 10, and updating the template to
var priority = double.Parse(node.HasValue("searchEngineRelativePriority") ? node.Value<string>("searchEngineRelativePriority") : "5")/10;
The text was updated successfully, but these errors were encountered: