Skip to main content

Posts

Showing posts with the label sitecore content serialization

Sitecore Content Serialization error - The container is defined twice

The Problem If you use Sitecore Content Serialization to serialize your Sitecore items into yml files (and if you use Leprechaun to generate/update item models automatically in our solution), there are chances you may stumble upon the error as in the snapshot below -  The Solution If you have used Sitecore Content Serialization, then you will know that it makes use of a module.json file in which you specify details about what items to serialize. It usually looks something like this -  {   "namespace": "Feature.Sample",   "items": {     "includes": [       {         "name": "templates",         "path": "/sitecore/templates/Feature/Sample"       },       {         "name": "renderings",         "path": "/sitecore/layout/Renderings/Feature/Sample"       },       {         "name": "buttons",         "database": "core",         "

Error while writing serialized item - Serialized version contained a blank language value - Sitecore Serialization error in CLI

Sitecore Content Serialization (SCS) is a system for serializing, sharing, and deploying content items, as well as keeping them in version control. It combines best of both Unicorn and TDS tools used widely in Sitecore applications for content serialization. If you havent used it yet, you should give it a try and learn more from  here . The Problem Recently, while performing a dotnet sitecore ser pull command to get latest updates of an item into source control, I got the below errors -  System.InvalidOperationException: Error while writing serialized item C:\projects\MyProbject.Website\src\Project\MyProjct\code\module\serialization\MySite\Home.yml ---> System.InvalidOperationException: Serialized version contained a blank language value! So this looked familiar with invariant language issue where an item may have field values in a language that doesn't exist or to put simply no language or blank language. This makes the item an invalid item and hence, it fails the serializati