1

I'm new to Unicorn, but recently we tried to add an item to a section that's been configured in Unicorn and we are getting the following error:

The parent item of /sitecore/templates/Site/Foundation/MultiTenant/New Template was not serialized. You cannot have a sparse serialized tree. You may need to serialize this item's parent.

But I have the patch configured like the following, which I thought would serialize the parent and all items underneath:

<!--
    See Unicorn.config for commentary on how configurations operate, or https://github.com/kamsar/Unicorn/blob/master/README.md
-->
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
  <sitecore>
    <unicorn>
      <configurations>
        <configuration name="Foundation.MultiTenant" description="MultiTenant Items" dependencies="Foundation.Serialization">
          <targetDataStore physicalRootPath="$(sourceFolder)\Foundation\MultiTenant\Serialization" type="Rainbow.Storage.SerializationFileSystemDataStore, Rainbow" useDataCache="false" singleInstance="true" />
          <predicate type="Unicorn.Predicates.SerializationPresetPredicate, Unicorn" singleInstance="true">
            <include name="Foundation.MultiTenant.Templates" database="master" path="/sitecore/templates/Site/Foundation/MultiTenant" />
          </predicate>
        </configuration>
      </configurations>
    </unicorn>
  </sitecore>
</configuration>

Can someone clue me into what this error message means and what might be missing from my Serialization patch that would fix this issue?

6

It could be a couple of things. When does this error happen to you? when starting up your Sitecore instance, or when you try and add new items to be serialised?

The error comes, when an item under Unicorn control is updated/saved/created, but where an initial serialisation of the entire tree has not been performed yet.

Most likely, you have forgotten the initial serialisation. If you then proceed to create items under the MultiTenant node, this error would come knocking.

At least that's my best guess. If this doesn't help you along, please update your question with contents of your file system folder structure and information on when this error triggers.

See also: https://github.com/kamsar/Unicorn/issues/48

  • I concur. Chances are it needs an initial serialization to get the state of the DB written to the disk. With Unicorn the disk is the master, so you have to initialize it from the DB the first time so it can become the master thereafter. – Kam Figy Jun 6 '17 at 22:15
  • Hmm that doesn't seem to be the issue. I have all the .yml files in the file system (including the parent). This is a helix based solution and I thought I had found the issue, but that's not working either. What I thought the issue was, was that the Foundation.Serialization.config was being loaded last, after Foundation.MultiTenant.Serialization for example. So I changed Foundation.Serialization.config to 0.Foundation.Serialization.config so it would load first and then it'd use patch:after for things that depended on it. But that didn't fix it either. – Dylan Young Jun 7 '17 at 0:06
  • Have you checked with ShowConfig, that everything merges up as expected? – Mark Cassidy Jun 7 '17 at 9:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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