Sitecore Unicorn standard values field child ID warnings

I thought I'd share this just in case anyone else wonders why they get the following WARN message for every single template that has a standard values set, when performing a Unicorn Sync.

To get things started:

Unicorn - 4.03 and 4.04
Sitecore - 8.2 Update 6

This happened to us when fully syncing from disk into a blank Sitecore instance, using a gulp script that calls a PowerShell sync, see below.

WARN  The standard values field of template /sitecore/templates/User Defined/Foundation/Theming/Theme/Theme Options:{XXX-XXX-XXX-XXX-XXXXXXXXXXXX} does not contain an ID that points to a child

The issue (i think) is that when unicorn de-serialises the template item, it has a field for standard values.
At the point of creation that items children haven't been created, most importantly the standard values item.
Sitecore checks the standard values field value and see that the id doesn't exist at this point, and not as a child of the item, so outputs the WARN message.
Unicorn then syncs the standard values item as a child and all is well with the data.

It just because the template item gets created before the child standard values item, if you sync again the warning is not output.
I don't think there is a way that we can resolve this as its a catch22 situation, as the template item needs to come before the standard values item in order for it to be a child, but the field needs to be populated.

Not a big issue just wanted to make sure no one else wastes any time investigating these warnings.





Comments

Popular posts from this blog

Sitecore DMS and Analytics Considerations

Sitecore Continuous Integration DMS and the Marketing Centre