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

sitemappriority for new page set to 0.5 #4441

Merged

Conversation

skamphuis
Copy link
Contributor

Fixes #3081

Summary

I added the default value for sitemapPriority on the client, since several other "controls" get their ddefault values there too, and since I didn't really find a better place for it.
I concidered PagesController.GetDefaultSettings but that didn't seem right either.

This change adds the default value to the property that is being used for the value of the dropdown. When the page is saved, this value is posted to the server too and correctly saved.

@bdukes bdukes added this to the 9.9.0 milestone Jan 29, 2021
@bdukes
Copy link
Contributor

bdukes commented Jan 29, 2021

Is the history of this issue that 0.5 was the default before the Persona Bar, and then we lost that default when the page settings was moved to the Persona Bar?

We probably also need to add a script to add 0.5 as the value for all pages missing a value, right?

I had thought that there was a setting somewhere to control the default value, but didn't find it after a quick search. Does anyone remember that being configurable, or did I make that up?

@skamphuis
Copy link
Contributor Author

Is the history of this issue that 0.5 was the default before the Persona Bar, and then we lost that default when the page settings was moved to the Persona Bar?

Yes, that is indeed what happened. In the server side code you will find the default too, if you search for "0.5F", which is probably why it does work when adding multiple pages.

We probably also need to add a script to add 0.5 as the value for all pages missing a value, right?

I don't think that's possible, because we can't see which pages have been set to 0 intentionally, and which because it was the default.

I had thought that there was a setting somewhere to control the default value, but didn't find it after a quick search. Does anyone remember that being configurable, or did I make that up?

I'm not aware of that setting. I looked at what needs to be done to create such a setting, but I think that would be a nice enhancement and not so much a bug fix.

@valadas
Copy link
Contributor

valadas commented Feb 1, 2021

I have put this on hold to review further.

If memory serves good we have a site level default priority setting that had a problems with the value being a double in one place and an int somewhere else. I kinda remember there was a PR to fix that issue but I am on mobile now. At any rate if that is the case, we should default to that value and not 0.5 IMO

@valadas
Copy link
Contributor

valadas commented Feb 1, 2021

Well, apparently memory did not serve good, the other PR must be just solving that value mismatch on one of those exiting fields, but we do not have a site-level default. So I am ok with this PR.

Copy link
Contributor

@valadas valadas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me

@valadas valadas merged commit e53e84e into dnnsoftware:develop Feb 1, 2021
@skamphuis skamphuis deleted the feature/3081-sitemap-priority branch November 23, 2022 10:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sitemap priority 0 when adding a single page
4 participants