4

On all our environments we decided to stop synchronisation of the page tests (aka A/B test). However there is a synchronisation on each item on the field "__Content test", which links it to the correct test.

It's not an option for us to disable syncing the item itself, so the field keeps getting overwritten with each deployment. I started investigating and found some articles on a ConfigurationFieldFilter. Implemented like this into the default Unicorn.config:

<fieldFilter type="Rainbow.Filtering.ConfigurationFieldFilter, Rainbow" singleInstance="true">
  <exclude fieldID="{700F4AAD-AD3B-4058-8673-A0CEE765A1F7}" note="'__Content test' field on Standard Template" />
</fieldFilter>

However, when deployed, this still keeps overwriting the field. Is there anything I'm doing wrong? Are there other solutions to my problem? Any help is appreciated!

Sitecore Version: 9.0 rev. 180604 (Update-2)
Unicorn version: 4.0.7

======UPDATE======:
According to the official Unicorn documentation on FieldFilter:

Field Filter
The Field Filter is a way to exclude certain fields from being controlled by Unicorn. Note that the control is not complete in that the value of ignored fields is never stored; it is stored and updated when other fields' values that are included change. However it is never deserialized or considered in the evaluator, and thus the value is effectively ignored.

So the full item is synchronised after any synchronised field has changed... Are there any other solutions on how to remove that specific field from synchronisation?

5
  • what are your Sitecore and Unicorn versions? Oct 30, 2019 at 8:58
  • Thanks for your comment, I've added it to the original question Oct 30, 2019 at 9:11
  • did you try by overriding the field filter per config in your project's serialization.config? Oct 30, 2019 at 14:33
  • From my understanding fieldFilter will stop to serialize field, but if this field is already serialized then it will be deserialized. Could you try to remove this field serialization from your .yml files and try again.
    – Anton
    Sep 22, 2020 at 19:07
  • Other option: upgrade Unicorn to 4.1 and use field transforms
    – Anton
    Sep 22, 2020 at 19:10

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Browse other questions tagged or ask your own question.