1

I have a problem when using unicorn serialization for Sitecore items, when I perform the initial serialization for the item and check the folder in the file system the items come like that enter image description here

I believe this happens with items that have many children items. below is the configuration for my site

    <configuration name="Feature.ATLP.Renderings.Serialization" description="ATLP Feature Serialization">
      <targetDataStore physicalRootPath="$(AtlpSerilizationFolder)\ATLP\Feature\Renderings" useDataCache="false" type="Rainbow.Storage.SerializationFileSystemDataStore, Rainbow" singleInstance="true"/>
      <predicate>
        <include name="Renderings.Feature.ATLP" database="master" path="/sitecore/layout/Renderings/Feature/atlp-informational-web"/>
      </predicate>
    </configuration>

    <configuration name="Project.ATLP.Templates.Serialization" description="ATLP Project Serialization" >
      <targetDataStore physicalRootPath="$(AtlpSerilizationFolder)\ATLP\Project\Templates" useDataCache="false" type="Rainbow.Storage.SerializationFileSystemDataStore, Rainbow" singleInstance="true"/>
      <predicate type="Unicorn.Predicates.SerializationPresetPredicate, Unicorn" singleInstance="true">
        <include name="Templates.Project.ATLP" database="master" path="/sitecore/templates/Project/atlp-informational-web"/>
      </predicate>
    </configuration>

    <configuration name="Project.ATLP.Layouts.Serialization" description="ATLP Project Serialization" >
      <targetDataStore physicalRootPath="$(AtlpSerilizationFolder)\ATLP\Project\Layouts" useDataCache="false" type="Rainbow.Storage.SerializationFileSystemDataStore, Rainbow" singleInstance="true"/>
      <predicate type="Unicorn.Predicates.SerializationPresetPredicate, Unicorn" singleInstance="true">
        <include name="Layouts.Project.ATLP" database="master" path="/sitecore/layout/Layouts/Project/atlp-informational-web"/>
        <include name="PlaceholderSettings.Project.ATLP" database="master" path="/sitecore/layout/Placeholder Settings/Project/atlp-informational-web"/>
      </predicate>
    </configuration>


    <configuration name="Project.ATLP.Media.Serialization" description="ATLP.Project.Serialization" >
      <targetDataStore physicalRootPath="$(AtlpSerilizationFolder)\ATLP\Project\Media" useDataCache="false" type="Rainbow.Storage.SerializationFileSystemDataStore, Rainbow" singleInstance="true"/>
      <predicate type="Unicorn.Predicates.SerializationPresetPredicate, Unicorn" singleInstance="true">
        <include name="Media.Project.ATLP" database="master" path="/sitecore/media library/Project/atlp/atlp-informational-web"/>
      </predicate>
    </configuration>


    <configuration name="Project.ATLP.Content.Serialization" description="ATLP.Project.Serialization" >
      <targetDataStore physicalRootPath="$(AtlpSerilizationFolder)\ATLP\Project\Content" useDataCache="false" type="Rainbow.Storage.SerializationFileSystemDataStore, Rainbow" singleInstance="true"/>
      <predicate type="Unicorn.Predicates.SerializationPresetPredicate, Unicorn" singleInstance="true">
        <include name="Content.Home.ATLP" database="master" path="/sitecore/content/AbuDhabiPorts/ATLP/atlp-informational-web/home"/>
        <include name="Content.Data.ATLP" database="master" path="/sitecore/content/AbuDhabiPorts/ATLP/atlp-informational-web/Data"/>
        <include name="Content.Dictionary.ATLP" database="master" path="/sitecore/content/AbuDhabiPorts/ATLP/atlp-informational-web/atlp-informational-web Dictionary"/>
      </predicate>
    </configuration>



    <configuration name="Project.ATLP.Presentation.Serialization" description="ATLP.Project.Serialization" >
      <targetDataStore physicalRootPath="$(AtlpSerilizationFolder)\ATLP\Project\Presentation" useDataCache="false" type="Rainbow.Storage.SerializationFileSystemDataStore, Rainbow" singleInstance="true"/>
      <predicate type="Unicorn.Predicates.SerializationPresetPredicate, Unicorn" singleInstance="true">
        <include name="Presentation.Styles.ATLP" database="master" path="/sitecore/content/AbuDhabiPorts/ATLP/atlp-informational-web/Presentation/Styles"/>
        <include name="Presentation.PartialDesigns.ATLP" database="master" path="/sitecore/content/AbuDhabiPorts/ATLP/atlp-informational-web/Presentation/Partial Designs"/>
        <include name="Presentation.PageDesigns.ATLP" database="master" path="/sitecore/content/AbuDhabiPorts/ATLP/atlp-informational-web/Presentation/Page Designs"/>
      </predicate>
    </configuration>


    <configuration name="Project.ATLP.Forms.Serialization" description="ATLP.Project.Serialization" >
      <targetDataStore physicalRootPath="$(AtlpSerilizationFolder)\ATLP\Project\Forms" useDataCache="false" type="Rainbow.Storage.SerializationFileSystemDataStore, Rainbow" singleInstance="true"/>
      <predicate type="Unicorn.Predicates.SerializationPresetPredicate, Unicorn" singleInstance="true">
        <include name="Forms.ATLP" database="master" path="/sitecore/Forms/atlp-informational-web"/>
      </predicate>
    </configuration>

  </configurations>
</unicorn>

Any advice what is wrong here?

2
  • 2
    This behaviour is by design and does not affect Unicorn's ability to sync and work with your items. The behaviour is designed so that your nested item structure can be serialized without hitting the Windows 248 character limit on path lengths. Additional information here (and in many other places) sitecore.stackexchange.com/questions/13683/…
    – Mark Cassidy
    Commented Oct 4, 2022 at 8:32
  • Do note that if/when you ever work with Sitecore CLI (SCS) to serialize content to disk this behavior is still exhibited with similar configuration settings. Commented Oct 4, 2022 at 13:56

1 Answer 1

0

I don't think there is anything wrong with your setup.

It looks like your paths in the file system would be too long so Unicorn decided for some of them to keep IDs instead of full paths.

You can check setting:

<!--  Rainbow - SERIALIZATION FOLDER PATH MAX LENGTH
          In Windows, there is 248 characters limit on the lenght of file system paths. To avoid exceeding the maximum path length, Rainbow will loop
                  long paths back to the root. This setting specifies the maximum length of the path to the serialization root path,
                  which determines how long item paths can be before they are looped.
          Important: The value of this setting must be the same on all Sitecore instances accessing the serialized data. 
          Important: When changing this value, you must reserialize all configurations!
          Example: A value of "90" for this setting will mean that item paths longer than 150 characters will be shortened, since Sitecore 
          reserves 8 characters (and 248 - 8 - 90 = 150). 
          Default value: 90
        -->
<setting name="Rainbow.SFS.SerializationFolderPathMaxLength" value="190" />
3
  • 1
    Definitely do NOT mess with this setting unless you have a FULL understanding of the implications thereof.
    – Mark Cassidy
    Commented Oct 4, 2022 at 8:29
  • I tried to mininize the folder path as i can bs still same issue so for confirmation this will not affact behaviour of syncing items right if i keep them as ids? Commented Oct 4, 2022 at 9:02
  • Yes, syncing will still work
    – Marek Musielak
    Commented Oct 4, 2022 at 9:03

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.