Long Path Issue During Serialization with Unicorn


While serializing Sitecore items with Unicorn you might get an error Long path names when using a Web-root-relative path. This issue comes due to serialized content path relatively bigger than the defined limit in configurations.
The serialization Provider looks like this

<serializationProvider type="Unicorn.Serialization.Sitecore.Fiat.FiatSitecoreSerializationProvider, Unicorn" rootPath="~/../../Unicorn" singleInstance="true" />

Item path can look like this

/sitecore/templates/Feature/SharjeelsWork/Navigation/Base navigation items folder/New template with a long name/New long section name/New field name with a very long name

In above written scenario you will get the issue while serializing content with Unicorn. To fix this issue you can follow few approaches written below.

Option 1:
You may be able to work around the issue by changing the SerializationFolder setting in Sitecore.config:








Option 2:
In second approach you can increase serialization folder path max length in Sitecore.config file. Here default value is 90 but you can increase as per your requirement. This serialization length max path length also have some limits so if this limit crossed then go for first approach explained in Option 1.









Option 3: Other way to cope with the path limit is to shorten path entries with symbolic links. In this approach just create a directory directly in your C or D drive and link that to your serialization folder. You can do it via command prompt.

·         create a C:\p directory to keep short links to long paths
·         mklink /J C:\p\foo C:\SharjeelsWork\Very\Long\Path\foo
·         add C:\p\foo to your path instead of the long path


These are the possible ways to handle Serialization folder path max length issue. I hope you will get the solution from explained approaches.





Happy Learning!!!






Comments

Popular posts from this blog

Error : DependencyManagement.dependencies.dependency.(groupId:artifactId:type:classifier)' must be unique: com.adobe.aem:uber-jar:jar:apis -> version 6.3.0 vs 6.4.0

Operators in Asterisk with Linux

ERROR Exception while handling event Sitecore.Eventing.Remote.PublishEndRemoteEventException: System.AggregateExceptionMessage: One or more exceptions occurred while processing the subscribers to the 'publish:end:remote'