Today I wanted to add a quick blog post about a situation we came across today. Our content editors were unable to add or delete personalisation rules. This was in the experience editor, running on sitecore XP 9.3.0.
The issue
A content editor, when trying to personalise a component in the experience editor, does the following:
- Adds a new personalisation rule and presses OK
- Component shows 2 rules
- Saves page
- Component shows 2 rules
- Adds a new personalisation rule and presses OK
- Component shows 3 rules
- Saves page
- Component shows 2 rules
So the third rule disappears after the content editor saves the page.
The only way to reset the components rules to the previous state, is to run a unicorn sync using previously saved data.
Investigating the issue
We found that the above problem only seemed to be an issue, when applying rules to the standard values of certain templates. Also, when we looked through the logs, we noticed a lot of entries referring to a test not being in a workflow state. Yet no tests were shown in the test area.
The solution
After drawing blanks at every turn, we decided to raise this with sitecore support. After a while, Yevhenii was able to confirm that this was indeed due to a known issue (reference number 457081).
was able to reproduce the behavior you reported in my local environment on a clean instance of Sitecore XP 9.3 (Initial Release). As far as I can see, the issue is related to an automatic content testing feature. It is caused by the Content Testing component, that subscribes to "item:saved" event and clears the field.
Yevhenii Sosidko
He went on to suggest the fix, given that we were not using that feature was to switch it off! This can be done using the following patch:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<settings>
<setting name="ContentTesting.AutomaticContentTesting.Enabled" value="false" />
</settings>
</sitecore>
</configuration>