1

I have a running environment with Sitecore 10 and Unicorn (4.1.5) for serialization and de-serialization.

On our current deployment, we are getting the following error on sync:

Warn: 1 non-fatal warning occurred during deserialization.While loading
master:/sitecore/templates/Feature/Metadata/Business
Unit/Content/Allocated BU NameThe fields 4c346442-e859-4efd-89b2-44aedf467d21 (likely
__Valid to), c8f93afe-bfd4-4e8f-9c61-152559854661 (likely __Valid from) are not present in Sitecore on the Template field
template.
This usually occurs because a template field was deleted, and a serialized item using that template has a value for the deleted field.
You can resolve this warning by reserializing the master:/sitecore/templates/Feature/Metadata/Business Unit/Content/Allocated BU Name item, or manually removing the deleted field value from the serialized item.

Though I checked manually, the fields are present. I am unable to understand the why behind it.

Please help me to understand it.

2
  • Have you tried reserializing it locally and deploying? Ideally remove that .yml from your target environment prior deployment. This usually resolves issues like this.
    – Kamil C
    Commented Mar 29, 2023 at 6:27
  • @KamilC: That item is a template. And we do not have content in our repo. Reproducing on local. Large DB size, so have that problem. Commented Mar 29, 2023 at 6:32

1 Answer 1

1

I can think of multiple scenarios when it can happen:

  • Someone was developing new functionality, added new fields to a template, serialized an item which uses that template, then decided that the field is no longer needed in the template, so removed it. Then pushed serialized item which still has that field.

  • Someone added a new field to a template. Both template with new field and serialized item which uses that field are there but you try to deserialize item first, before you deserialize template.

  • Someone forgot to push the template with new field but already pushed an item which uses that field.

In general, serialized item on the drive has a value for a field that is not there on the template of the item. You can still deserialize that item and value of the field will be skipped.

Still, what you should do is checking when was the serialized item last modified, was there a new field added to that template and either serialize the item without that field if it's not needed or make sure that the template contains the field in your database.

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.