1

I have been running into an error using Sitecore (9.2) Unicorn (4.1.1) when I try to serialize content. These content files are generated by a migration application that is reading data from a database. The error is (some names masked)

Duplicate serialized item IDs were detected (c385a844-4b5a-437c-a746-9de832713749) - this usually indicates corruption in the serialization provider data.
Item 1: master:/sitecore/content/App/globals/Test Directory/Tests/#/xxxxx (c385a844-4b5a-437c-a746-9de832713749)
Item 1 ProviderId: D:\Web\App_Data\Unicorn\App\Content\App\globals\Test Directory\Tests\#\xxxxx.yml
Item 2: master:/sitecore/content/App/globals/Test Directory/Tests/#/xxxxx (c385a844-4b5a-437c-a746-9de832713749)
Item 2 ProviderId: D:\Web\App_Data\Unicorn\App\Content\App\globals\Test Directory\Tests\#\xxxxx.yml
ERROR: Consistency check failed - aborting loading. (Unicorn.Loader.ConsistencyException)
at Unicorn.Loader.SerializationLoader.DoLoadItem(IItemData serializedItemData, IConsistencyChecker consistencyChecker)
at Unicorn.Loader.SerializationLoader.LoadOneLevel(IItemData rootSerializedItemData, IDeserializeFailureRetryer retryer, IConsistencyChecker consistencyChecker)
at Unicorn.Loader.SerializationLoader.LoadTreeInternal(IItemData root, IDeserializeFailureRetryer retryer, IConsistencyChecker consistencyChecker)
at Unicorn.Loader.SerializationLoader.LoadTree(IItemData rootItemData, IDeserializeFailureRetryer retryer, IConsistencyChecker consistencyChecker)
at Unicorn.Loader.SerializationLoader.LoadAll(IItemData[] rootItemsData, IDeserializeFailureRetryer retryer, IConsistencyChecker consistencyChecker, Action`1 rootLoadedCallback)
at Unicorn.SerializationHelper.SyncTree(IConfiguration configuration, Action`1 rootLoadedCallback, Boolean runSyncStartPipeline, IItemData partialSyncRoot)
at Unicorn.SerializationHelper.SyncConfigurations(IConfiguration[] configurations, IProgressStatus progress, ILogger additionalLogger)

What seems odd about this is that the file and item for both items that seems to be duplicates are the same, and the file name is the same. A search in Sitecore using the ID shows finds the one item that it claims is a duplicate. A search of the files for that ID shows just the one file. So I am puzzled how it can be a duplicate.

  • You need to delete one copy of the item. yml to fix this. – Abhay Dhar Nov 6 '19 at 8:34
0

This is pretty common in unicorn serialization world and it usually happens when you have two items at same path with same name but with different IDs. Common scenario for this to occur is

  • One developer serializes and checks in the item. The other developer already has the item (or creates a new item) but since the item is created in his system so it has a different ID. Now when this developer tries to perform a unicorn sync, unicorn is unable to create the item based on the yml file and reports the issue that you have mentioned.

Solution:

  • If you don't want the item that you have created, delete it and perform a unicorn sync
  • If you want your item to stay and the other item to be removed, go to the Developer Tab and hit Serialize item and then perform a unicorn sync. You can go to the corresponding parent item and hit Serialize tree if you wanted other items at the same level also to be serialized and tracked as part of unicorn
| improve this answer | |
  • Thank you for your input. However, there is no other Unicorn serialization file or item with the same ID, as I did searches both in Sitecore and the file system for the IDs in question. There is only one file. with the IDs in question. So unless I am mistaken, I don't think this is solved. If you look at the code block above, it is showing the same information for both item 1 and item 2. That is why I am puzzled. – Gary Williams Nov 5 '19 at 21:32
  • Just go to the parent item then on the developer tab click Serialize Tree. After this, you will no longer see the error message in unicorn – Sumit Upadhyay Nov 6 '19 at 9:28

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.