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/">
        <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" />

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


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. 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
  • Is there a way a sparse tree could be serialized programmatically for Sitecore 9? Thanks. Oct 16 '20 at 16:05
  • I had the same problem, and it's fixed by the below procedure (serialize parent in Sitecore). I can confirm that the parent item did exist in the Unicorn file system (parent.yml and all it's children in a folder), so not sure what serializing that item in Sitecore does to make this work, but ideally we shouldn't have to do this. Any further info on why this is happening and how we can configure unicorn to not require this extra step? @KamFigy ?
    – Jeeby
    Dec 4 '20 at 1:02

I came across the same error.

As the error message displayed mentions "You may need to serialize this item's parents", I tried to serialize the tree before going into config.

Here's how I did it.

  1. Select the parent item (where the error occurred on saving the item)
  2. Go to Developer Tab and Select "Serialize Tree" or "Serialize item " based on your requirement

(It might happen you have to repeat this once.)

Check the physical path mentioned in the message for your item's yml files.

Your item is now controlled by Unicorn!

enter image description here

  • Where is the Developer Tab? Not sure what that's referring to. Dec 16 '19 at 19:15
  • Developer Tab was part of old Sitecore i guess up to V7.X In Latest versions of Sitecore Go to "My Toolbar" and under Chunks you will see a "Serialize" chunk and add all the options of serialization and use them as suggested above by @Ruchi Yevle ![enter image description here](i.stack.imgur.com/dUGaq.png) Feb 21 '20 at 5:18

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.