Skip to content
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

Creating an xml site map slider only acepting int #6441

Open
carlhope opened this issue Sep 21, 2024 · 3 comments
Open

Creating an xml site map slider only acepting int #6441

carlhope opened this issue Sep 21, 2024 · 3 comments
Labels
category/umbraco-cms state/needs-investigation This requires input from HQ or community to proceed

Comments

@carlhope
Copy link

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;

@sofietoft sofietoft added state/needs-investigation This requires input from HQ or community to proceed category/umbraco-cms labels Sep 23, 2024
@sofietoft
Copy link
Contributor

Thanks for reporting this @carlhope 💪

We'll look into the guide, to determine whether we're talking about a bug or faulty docs.

@sofietoft
Copy link
Contributor

Hi @carlhope !

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 💪

@sofietoft
Copy link
Contributor

I've reported the issue here: umbraco/Umbraco-CMS#17189

For now, I'll add a note in the documentation about using single numbers instead of decimals.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category/umbraco-cms state/needs-investigation This requires input from HQ or community to proceed
Projects
None yet
Development

No branches or pull requests

2 participants