0

I am using Sitecore 9.1.1 and I am trying to override the value of Rainbow.SFS.SerializationFolderPathMaxLength in the foundation.serialization.settings.config. But sitecore is taking the value from Rainbow.config which is location in the root of the include folder. I thought the order of the config files should be first all the root inlude folder and than all the subfolders in the alphabetic order.

layers.config:

<?xml version="1.0" encoding="utf-8"?>
<layers>
  <layer name="Sitecore" includeFolder="/App_Config/Sitecore/">
    <loadOrder>
      <add path="Reporting" type="Folder" />
      <add path="ContentSearch.Azure" type="Folder" />
      <add path="Marketing.Xdb.Sql.Common" type="Folder" />
      <add path="CMS.Core" type="Folder" />
      <add path="AntiCSRFModule" type="Folder" />
      <add path="Contact.Enrichment.Services.Client" type="Folder" />
      <add path="ContentSearch" type="Folder" />
      <add path="Buckets" type="Folder" />
      <add path="DeviceDetection.Client" type="Folder" />
      <add path="DetectionServices.Location" type="Folder" />
      <add path="ItemWebApi" type="Folder" />
      <add path="Owin" type="Folder" />
      <add path="Owin.Authentication" type="Folder" />
      <add path="Owin.Authentication.IdentityServer" type="Folder" />
      <add path="Update" type="Folder" />
      <add path="XConnect.Client.Configuration" type="Folder" />
      <add path="Marketing.Xdb.MarketingAutomation.Operations" type="Folder" />
      <add path="Marketing.Xdb.MarketingAutomation.Reporting" type="Folder" />
      <add path="Marketing.Xdb.ReferenceData.Core" type="Folder" />
      <add path="Marketing.Xdb.ReferenceData.Client" type="Folder" />
      <add path="Marketing.Operations.xMgmt" type="Folder" />
      <add path="Marketing.Segmentation.xMgmt" type="Folder" />
      <add path="Marketing.Xdb.MarketingAutomation.Locators" type="Folder" />
      <add path="Marketing.Xdb.ReferenceData.Service" type="Folder" />
      <add path="Marketing.Xdb.ReferenceData.SqlServer" type="Folder" />
      <add path="Marketing.Operations.Xdb.ReferenceData" type="Folder" />
      <add path="Marketing.xDB" type="Folder" />
      <add path="Marketing.Tracking" type="Folder" />
      <add path="Tracking.Web.RobotDetection" type="Folder" />
      <add path="Marketing.Assets" type="Folder" />
      <add path="Marketing.Xdb.MarketingAutomation.Tracking" type="Folder" />
      <add path="Mvc" type="Folder" />
      <add path="Tracking.Web.MVC" type="Folder" />
      <add path="Services.Client" type="Folder" />
      <add path="ExperienceContentManagement.Administration" type="Folder" />
      <add path="Speak.Integration" type="Folder" />
      <add path="Messaging" type="Folder" />
      <add path="Processing.Tasks.Messaging.Xmgmt" type="Folder" />
      <add path="SPEAK" type="Folder" />
      <add path="Speak.Applications" type="Folder" />
      <add path="LaunchPad" type="Folder" />
      <add path="Experience Editor" type="Folder" />
      <add path="ContentTagging" type="Folder" />
      <add path="ListManagement" type="Folder" />
      <add path="Marketing.Client" type="Folder" />
      <add path="ContentTesting" type="Folder" />
      <add path="ExperienceProfile" type="Folder" />
      <add path="MVC.ExperienceEditor" type="Folder" />
      <add path="ExperienceExplorer" type="Folder" />
      <add path="MVC.DeviceSimulator" type="Folder" />
      <add path="SPEAK.Components" type="Folder" />
      <add path="ExperienceAnalytics" type="Folder" />
      <add path="ExperienceForms" type="Folder" />
      <add path="ExperienceForms" type="Folder" />
      <add path="FederatedExperienceManager" type="Folder" />
      <add path="UpdateCenter" type="Folder" />
      <add path="CampaignCreator" type="Folder" />
      <add path="Marketing.Automation.Client" type="Folder" />
      <add path="Marketing.Automation.ActivityDescriptors.Client" type="Folder" />
      <add path="EmailExperience" type="Folder" />
      <add path="PathAnalyzer" type="Folder" />
    </loadOrder>
  </layer>
  <layer name="Modules" includeFolder="/App_Config/Modules/" />
  <layer name="Custom" includeFolder="/App_Config/Include/">
    <loadOrder>
      <add path="Foundation" type="Folder" />
      <add path="Feature" type="Folder" />
      <add path="Project" type="Folder" />
    </loadOrder>
  </layer>
  <layer name="Environment" includeFolder="/App_Config/Environment/" />
</layers>

Location of the rainbow.config file:

App_Config\Include\Rainbow.config

Location and content of foundation.seriazation.settings.config:

App_Config\Include\Foundation\Foundation.Serialization.Settings.config

<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:set="http://www.sitecore.net/xmlconfig/set/">
  <sitecore>
    <settings>
      <!--  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" set:value="150" />
      <setting name="Rainbow.SFS.MaxItemNameLengthBeforeTruncation" set:value="50" />
    </settings>
  </sitecore>
</configuration>

Sitecore is still showing the value of 110 from the rainbow.config instead of value from Foundation.serialization.settings.config.

  • Files are processed before subfolders by default. Be very careful with changing that setting by the way. – Mark Cassidy Jun 20 at 9:42
  • @MarkCassidy Yeah if that is the case why my file in the foundation folder is not overriding the setting in the rainbow.config which is located in the root of include folder? – Arun Kumar Jun 21 at 1:26
  • This is happening in Sitecore 9.2 as well and below solution works for 9.2 – Mrunal Brahmbhatt Sep 25 at 3:30
2

It was also same for me I added <layer name="Custom" includeFolder="/App_Config/Include/" /> entry just above

<layer name="Custom" includeFolder="/App_Config/Include/">
    <loadOrder>
      <add path="Foundation" type="Folder" />
      <add path="Feature" type="Folder" />
      <add path="Project" type="Folder" />
    </loadOrder>
  </layer>

So the final output of layer.config will be as given below - And it works for me.

<layer name="Custom" includeFolder="/App_Config/Include/" />
<layer name="Custom" includeFolder="/App_Config/Include/">
        <loadOrder>
          <add path="Foundation" type="Folder" />
          <add path="Feature" type="Folder" />
          <add path="Project" type="Folder" />
        </loadOrder>
      </layer>
  • where exactly in the layers file. My layers.config already has the config similar to yours? – Arun Kumar Jun 20 at 5:10
  • @ArunKumar I updated my answer Please try this... – Yogesh Sharma Jun 20 at 5:26

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.