Editing personalization for a component might fail with an unhandled exception after resetting the Shared Layout details. There are two possible scenarios for the issue:
The following message can be found in the logs:
Exception: System.InvalidOperationException Message: name Source: Sitecore.Client at Sitecore.Shell.Applications.WebEdit.Dialogs.Personalization.PersonalizationForm.GetRuleSectionHtml(XElement rule) at Sitecore.Shell.Applications.WebEdit.Dialogs.Personalization.PersonalizationForm.RenderRules()
To resolve the issue, consider one of the following options:
context.currentContext.value = encodeURIComponent("ResetFinal=DoNotReset&ResetShared=1");with the following line:
context.currentContext.value = encodeURIComponent("ResetFinal=All&ResetShared=1");