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

Fix settings Dictionary #909

Closed
wants to merge 1 commit into from
Closed

Fix settings Dictionary #909

wants to merge 1 commit into from

Conversation

lunchin
Copy link
Contributor

@lunchin lunchin commented Feb 13, 2023

Raise event for remote servers to update its dictionary.

Fixes: #895

Raise event for remote servers to update its dictionary.

Fixes: 895
@lunchin
Copy link
Contributor Author

lunchin commented Feb 13, 2023

Hold merge until confirmation fixes issue.

@Hinneman
Copy link

With this implementation we get null for a website setting that had previously changed guid, republishing it helps untill the site is restarted.

We changed row 251 to use GetDescendants instead of GetChildren, which solved this particular issue.

Copy link

@Hinneman Hinneman left a comment

Choose a reason for hiding this comment

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

as mentioned in the Issues conversations, this fix unfortunately did not solve the problem in a load balanced environment.

@@ -192,6 +238,12 @@ public void UpdateSettings(Guid siteId, IContent content, bool isContentNotPubli
SiteSettings[siteId.ToString() + $"-{contentLanguage}"][contentType] = content;
Copy link

Choose a reason for hiding this comment

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

shouldn't SiteSettings[$"{siteId}-default"][contentType] = content; be set as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes I guess there is case where it already exists in the dictionary

@jonascarlbaum
Copy link

I have a working fix, as described here.
#895 (comment)

@jonascarlbaum
Copy link

@lunchin can you check out my comment #895 (comment)

These small changes in the SettingsService.cs file makes it work. Works in production site in DXP (in our case CMS11, but seems same code still)…

@lunchin lunchin closed this Jan 7, 2025
@lunchin
Copy link
Contributor Author

lunchin commented Jan 7, 2025

Adding better implementation

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Site Settings not updated when running on multiple instances
4 participants