Comments (4)
I'll take a look when I get a chance. Thanks for the clear problem statement :)
from unicorn.
Hi Kevin,
I'm having trouble reproducing this issue. I set up an example tree like you had:
I serialized all of those items.
Then I set my predicate configuration to this:
<include database="master" path="/sitecore/templates/Sites/Configuration"> <exclude path="/sitecore/templates/Sites/Configuration/Online Services" /> </include>
Next I deleted the ignored items from the disk (Online Services and its children) and ran a sync. As expected, the sync worked correctly.
Then, following your steps, I deleted the Configuration
folder from the file system and then ran a sync. It seems like in your case Unicorn deleted both Specifications and Online Services items during the sync. In my case, it only deleted Specifications.
The loader does evaluate both the source data and the serialized data when evaluating orphans, as seen in this excerpt from SerializationLoader.cs
(185-203):
// get the corresponding item from Sitecore
ISourceItem rootItem = SourceDataProvider.GetItemById(rootSerializedItem.DatabaseName, rootSerializedItem.Id);
// we add all of the root item's direct children to the "maybe orphan" list (we'll remove them as we find matching serialized children)
if (rootItem != null)
{
var rootChildren = rootItem.Children;
foreach (ISourceItem child in rootChildren)
{
// if the preset includes the child add it to the orphan-candidate list (if we don't deserialize it below, it will be marked orphan)
// [ADDED] Here is where source items that are excluded (e.g. this example) are removed from the list of items to possibly delete
var included = Predicate.Includes(child);
if (included.IsIncluded)
orphanCandidates[child.Id] = child;
else
{
Logger.SkippedItem(child, Predicate.GetType().Name, included.Justification ?? string.Empty);
}
}
}
Am I missing something on reproducing this?
from unicorn.
Hi Kam,
thanks for looking into this. When you delete the Configuration
folder from the disk, can you try to also delete the Specifications
folder in Sitecore? Then run a sync. The sync fails, if I have on the disk only the Configuration.item
(as you also have) and in Sitecore only the folder Configuration
with it's child Online Services
(but without the Specifications
).
It seems that it only doesn't work if the excluded path item (Online Services
) is the only child of an item included in the sync (Configuration
).
from unicorn.
Hi Kevin,
I was able to reproduce the issue and have fixed it in version 2.0.2 that is on NuGet now :)
Let me know if it doesn't work for you.
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
- DuplicateItemName exception HOT 2
- 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.