"System.InvalidOperationException: name" is thrown when editing personalization for a component


Description

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()

Solution

To resolve the issue, consider one of the following options: