Sync issue with Unicorn. What was it and how I fixed it.

Recently I have worked on a project and I had an issue syncing Unicorn and I decided to write this post to share what was it and how I fixed it.

The Problem:

I tried syncing, reserializing Unicorn but I would still keet getting this screen:

screen1

This is what my configuration looked like(Note the bolded section):

<configuration xmlns:patch=”http://www.sitecore.net/xmlconfig/”&gt;

<sitecore>

<unicorn>

<configurations>

<configuration name=”Feature.Navigation” description=”Feature Navigation” dependencies=”Foundation.Serialization” patch:after=”configuration[@name=’Foundation.Serialization’]”>

<targetDataStore physicalRootPath=”$(sourceFolder)\feature\navigation\serialization” type=”Rainbow.Storage.SerializationFileSystemDataStore, Rainbow” useDataCache=”false” singleInstance=”true” />

<predicate type=”Unicorn.Predicates.SerializationPresetPredicate, Unicorn” singleInstance=”true”>

<include name=”Feature.Navigation.Templates” database=”master” path=”/sitecore/templates/Feature/Navigation” />

<include name=”Feature.Navigation.Renderings” database=”master” path=”/sitecore/layout/renderings/Feature/Navigation” />

 <include name=”Feature.Navigation.Media” database=”master” path=”/sitecore/media library/Feature/Navigation” />

</predicate>

<roleDataStore type=”Unicorn.Roles.Data.FilesystemRoleDataStore, Unicorn.Roles” physicalRootPath=”$(sourceFolder)\feature\navigation\serialization\Feature.Navigation.Roles” singleInstance=”true”/>

<rolePredicate type=”Unicorn.Roles.RolePredicates.ConfigurationRolePredicate, Unicorn.Roles” singleInstance=”true”>

<include domain=”modules” pattern=”^Feature Navigation .*$” />

</rolePredicate>

</configuration>

</configurations>

</unicorn>

</sitecore>

</configuration>

The Solution

So after reviewing the configurations and validating that they seemed to be correct, I reviewed all the include mappins. So when I got to the Media section I noticed that the path defined on the configuration file didn’t exist within Sitecore’s content tree. It turned out that it was missing the Navigation folder under /sitecore/media library/Feature.

When I created it, unicorn started syncing properly again.  In other words, if you are not being able to sync double check if your configs and the paths underneath Sitecore  are all valid. This was the problem in my case. Hopefully this will save anyone sometime in the future.

screen

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s