Comments (2)
Hmm not entirely sure I follow the scenario.
Not sure if this is possible, but would be good if unicorn could update the path and name of the item in the same time.
Path and name are interlocked; where "name" is just the tail end of the "path".
I'm guessing that it's probably because unicorn tries to move the item first and then update it's name and this will not work as there is already an item with such name in the second path.
Unicorn doesn't "move the item" at all. Sitecore does. Unicorn just reflects what's in Sitecore. Do you have the full stack trace of that DuplicateItemName exception?
To fix that error we can manually update name of the first item to something else, and then unicorn sync works.
Unicorn Sync is the process of taking what's on disk (yaml files) and updating the Sitecore content tree to reflect. When moving an item from one Unicorn configuration scope to another Unicorn configuration scope, you would need to perform a full reserialize of both configurations involved.
I would need some additional information to do anything with this. But generally speaking, if you move a Sitecore item with name "ItemA" to another part of the Sitecore content tree that already has an item named "ItemA" - you would run into an exception on certain Sitecore versions. And Unicorn plays no part in this.
from unicorn.
Here is the error from the logs. It's from my local tests. As you can see it can't move _Donation2 item because 'The item name "_Donation" is already defined on this level.'
We have the items
master:/sitecore/templates/Feature/Form/_Donation
master:/sitecore/templates/Foundation/Form/_Donation
and my colleague renamed the first one to Donation Base
and moved to Foundation and he serialized changes to the repo. So in repo and in his database we have two items:
master:/sitecore/templates/Foundation/Form/_Donation Base (previously: master:/sitecore/templates/Feature/Form/_Donation)
master:/sitecore/templates/Foundation/Form/_Donation
I pulled that change and I got such an error. I feel that I got that error because in my database I still have the first item under old name: (master:/sitecore/templates/Feature/Form/_Donation).
To fix that issue I renamed that item to something else, and then sync went fine.
Not sure if this is a unicorn or Sitecore error. Or is it error at all, maybe it's a feature ;)
44940 15:31:35 ERROR ERROR: Some directories could not be loaded. (1 inner failures)
master:/sitecore/templates/Foundation/Form/_Donation2 (c247134c-aa4c-4e52-8af8-785310e8d1f5) (Unicorn.DeserializationAggregateException)
at Unicorn.Loader.DeserializeFailureRetryer.RetryAll(ISourceDataStore sourceDataStore, Action`1 retrySingleItemAction, Action`1 retryTreeAction)
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)
INNER EXCEPTION
master:/sitecore/templates/Foundation/Form/_Donation2 (c247134c-aa4c-4e52-8af8-785310e8d1f5) (Rainbow.Storage.Sc.Deserialization.DeserializationException)
No stack trace available.
INNER EXCEPTION
The item name "_Donation" is already defined on this level. (Sitecore.Exceptions.DuplicateItemNameException)
at Sitecore.Data.Items.ItemUtil.AssertDuplicateItemName(Item destinationItem, Item sourceItem, String name)
at Sitecore.Data.Items.Item.MoveTo(Item destination)
at Rainbow.Storage.Sc.Deserialization.DefaultDeserializer.GetOrCreateTargetItem(IItemData serializedItemData, Boolean& newItemWasCreated)
at Rainbow.Storage.Sc.Deserialization.DefaultDeserializer.Deserialize(IItemData serializedItemData, IFieldValueManipulator fieldValueManipulator)
at Rainbow.Storage.Sc.SitecoreDataStore.Save(IItemData item, IFieldValueManipulator fieldValueManipulator)
at Unicorn.Evaluators.SerializedAsMasterEvaluator.EvaluateUpdate(IItemData sourceItem, IItemData targetItem)
at Unicorn.Loader.SerializationLoader.DoLoadItem(IItemData serializedItemData, IConsistencyChecker consistencyChecker)
at Unicorn.Loader.DeserializeFailureRetryer.RetryAll(ISourceDataStore sourceDataStore, Action`1 retrySingleItemAction, Action`1 retryTreeAction)
from unicorn.
Related Issues (20)
- security Vulnerabilities in Unicorn.SharedSecret.config file HOT 1
- Dilithium + Unicorn.DataProvider.10.1 HOT 3
- Sitecore 10.1 uses Sitecore.Kernel 16.0.0.0 version which does not have attribute 'UsedImplicitlyAttribute' and unicorn uses this attribute HOT 3
- Syncing Unchecked Shared field checkbox is not performing the movement of data from SharedFields to VersionFields tables HOT 10
- Unicorn.aspx indicates Transparent Sync is enabled on configs but TS is not working and does not display in Content Editor warning HOT 4
- Unicorn.DataProvider.10.1.config role:require setting prevents the config from being loaded on XM0 HOT 2
- Error message during Unicorn Sync "The statement terminated. The maximum recursion 100 has been exhausted before statement completion." HOT 2
- Performing a sync on a configuration with Transparant Sync breaks stuff?? HOT 3
- Unicorn added <site> breaks Sitecore on ContentDelivery roles in 10.1.2 HOT 5
- UnauthorizedAccessException with SyncSilent HOT 2
- When we are deploying the changes on the Sitecore DEV site by using Azure Paas we are getting this error HOT 1
- Unicorn RainbowCodeGeneration is not supporting Sitecore 10.2 for serializing model HOT 3
- Verb - Reserialize ERROR: The remote host closed the connection. The error code is 0x800704CD.
- Not possible to config patch the fieldFilter exclude list HOT 4
- Moved item can end up deleted on sync HOT 1
- Sync Challenge Issue
- Serialization issue in cloned items HOT 1
- *feature* Is Unicorn supporting Sitecore 10.3? HOT 3
- Moving items results in deleted items
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unicorn.