1

I am using Sitecore 9.2 XP and Unicorn for serialization.

When a new Base template is created, name of the yml file created by Unicorn is too short compared to original Base Template name.

I tried increasing the value from default 30 to 50 in setting Serialization.MaxItemNameLengthBeforeTruncation in config file Sitecore.Serialization.config under folder {YourProject Webroot}\App_Config\Sitecore\CMS.Core as shown below but it is not working :

            <!--  MAX ITEM NAME LENGTH BEFORE TRUNCATION
            NOTE: This setting is only required when the 'Serialization.SerializationType' setting is set to YAML.
            Sitecore item names can become so long that they cannot fit on the filesystem without hitting the max path length.
            This setting controls when to truncate item file names that are extremely long so they fit in the filesystem.
            The value must be less than MAX_PATH - SerializationFolderPathMaxLength - Length of GUID - length of file extension.
            Default value: 30
            -->
            <setting name="Serialization.MaxItemNameLengthBeforeTruncation" value="50" />

How to fix this?

Actual Folder Name in Sitecore shown below :

enter image description here

And Yml file created by Unicorn is shown below :

enter image description here

2
  • Replace your config screenshots with code snippets for SEO reasons - that would help others to gain from your posts.
    – Marek Musielak
    May 26 at 6:01
  • 1
    Thanks for the Suggestion Marek, updated the details with code snippet. May 26 at 8:51

1 Answer 1

1

Solution is to change the value from 30 to 50 in Rainbow.config placed under {your Project Webroot }\App_Config\Include folder for setting Rainbow.SFS.MaxItemNameLengthBeforeTruncation as shown below :

            <!--  Rainbow MAX ITEM NAME LENGTH BEFORE TRUNCATION
                Sitecore item names can become so long that they will not fit on the filesystem without hitting the max path length.
                        This setting controls when Rainbow truncates item file names that are extremely long so they will fit on the filesystem.
                        The value must be less than MAX_PATH - SerializationFolderPathMaxLength - Length of GUID - length of file extension.
                Default value: 30
            -->
            <setting name="Rainbow.SFS.MaxItemNameLengthBeforeTruncation" value="50" />

Note : Location of Rainbow.config file may vary depending on your project webroot folder setup.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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