Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If a path is included twice, a Unicorn.Loader.ConsistencyException is thrown #44

Closed
yannisgu opened this issue Jun 4, 2015 · 2 comments

Comments

@yannisgu
Copy link

yannisgu commented Jun 4, 2015

Let's assume a include configuration like this:

  <predicate type="Unicorn.Predicates.SerializationPresetPredicate, Unicorn" singleInstance="true">
            <include database="core" path="/sitecore/content/Documents and settings/All users"/>
            <include database="core" path="/sitecore/content/Documents and settings/All users/Start menu" />
</predicate>

Serialization will work fine, however when performing a sync, this will throw an exception like:

2092 10:52:52 ERROR [Unicorn]: Duplicate serialized item IDs were detected ({B965ECE5-5879-4D8D-A6B1-4233D7D06B0F}) - this usually indicates corruption in the serialization provider data.<br>Item 1: core:/sitecore/content/Documents and settings/All users/Start menu ({B965ECE5-5879-4D8D-A6B1-4233D7D06B0F})<br> Item 1 ProviderId: Z:\work\9cb9e3c71f951d07\serialization\app\core\sitecore\content\Documents and settings\All users\Start menu.item
Item 2: core:/sitecore/content/Documents and settings/All users/Start menu ({B965ECE5-5879-4D8D-A6B1-4233D7D06B0F})
Item 2 ProviderId: Z:\work\9cb9e3c71f951d07\serialization\app\core\sitecore\content\Documents and settings\All users\Start menu.item
2092 10:52:52 ERROR ERROR: Consistency check failed - aborting loading. (Unicorn.Loader.ConsistencyException)
at Unicorn.Loader.SerializationLoader.DoLoadItem(ISerializedItem serializedItem, IConsistencyChecker consistencyChecker)
   at Unicorn.Loader.SerializationLoader.LoadTree(ISerializedItem rootItem, IDeserializeFailureRetryer retryer, IConsistencyChecker consistencyChecker)
   at Unicorn.Loader.SerializationLoader.LoadAll(ISerializedItem[] rootItems, IDeserializeFailureRetryer retryer, IConsistencyChecker consistencyChecker, Action`1 rootLoadedCallback)
   at Unicorn.ControlPanel.SyncConsole.Process(IProgressStatus progress)

Would be cool if the exception was clearer or even better if this case was just ignored.

@kamsar
Copy link
Collaborator

kamsar commented Jun 5, 2015

This is really a configuration syntax error, but a nicer error would be a decent idea. I'll consider it if I have time.

@kamsar
Copy link
Collaborator

kamsar commented Jul 24, 2015

Unicorn 3 will support this scenario, if you want to use it, because you have a tree per <include>

@kamsar kamsar closed this as completed Jul 24, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants