sitecoreunicorn / unicorn Goto Github PK
View Code? Open in Web Editor NEWA Sitecore utility designed to simplify deployment of Sitecore items across environments automatically
License: MIT License
A Sitecore utility designed to simplify deployment of Sitecore items across environments automatically
License: MIT License
For seemingly no reason, I am getting two different kinds of errors upon trying to "Reserialize Default Configuration Now" in the control panel.
The first error is like the following, and seems to change the path that it throws at random:
ERROR: Access to the path 'Random Path in the serialization folder' is denied. (System.UnauthorizedAccessException)
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.Directory.DeleteHelper(String fullPath, String userPath, Boolean recursive, Boolean throwOnTopLevelDirectoryNotFound)
at System.IO.Directory.Delete(String fullPath, String userPath, Boolean recursive, Boolean checkHost)
at Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.DeleteItemRecursive(ISerializedReference reference)
at Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.DeleteItemRecursive(ISerializedReference reference)
at Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.DeleteItemRecursive(ISerializedReference reference)
at Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.DeleteItemRecursive(ISerializedReference reference)
at Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.DeleteSerializedItem(ISerializedReference item)
at Unicorn.ControlPanel.ReserializeConsole.Process(IProgressStatus progress)
The second error is consistent and happens when it reaches sitecore/layout and hasn't already crashed from the previous error:
ERROR: Object reference not set to an instance of an object. (System.NullReferenceException)
at Sitecore.Data.Serialization.ItemSynchronization.BuildSyncItem(Item item)
at Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.SerializeItem(ISourceItem item)
at Unicorn.ControlPanel.ReserializeConsole.Serialize(ISourceItem root, IPredicate predicate, ISerializationProvider serializationProvider, ILogger logger)
at Unicorn.ControlPanel.ReserializeConsole.Serialize(ISourceItem root, IPredicate predicate, ISerializationProvider serializationProvider, ILogger logger)
at Unicorn.ControlPanel.ReserializeConsole.Serialize(ISourceItem root, IPredicate predicate, ISerializationProvider serializationProvider, ILogger logger)
at Unicorn.ControlPanel.ReserializeConsole.Process(IProgressStatus progress)
I have tried reinstalling Unicorn multiple times. I get the same errors as above if I first delete the serialization folder and try to do the initial setup in the control panel again.
In TDS there was a feature to delete before update, is this how serialization currently behaves?
In TDS at least, this only impacted standard values. If I create an item, then update the standard values, the item will not inherit the changes as it was already created. So in TDS we would have it delete everything, create the templates first, then create the content items. It would then act as if the item was created for the first time, and inherit the new standard values. In early development this was really useful as templates are usually in flux for awhile.
It appears Unicorn/serialization works this way but wanted to see if there were any caveats before continuing.
Hi Kam
We have an error with Unicorn 2 in the media library. For this example I have the whole media library serialized:
<include database="master" path="/sitecore/media library"/>
When I add a file (i.e. an image) to the media library it seems to work and the item is serialized. But when I want to save the item again without changing the blob (i.e. changing the alt-text of my image), I always get the following error message as browser popup (here in chrome):
It doesn't matter if I sync the database exactly before I change the alt-text and save the image item, the error message is always shown. I have tested this on a clean Sitecore 7.2 (rev. 140314).
Can you reproduce this or am I doing something wrong? Or what be the cause of this? When I interpret the error message correctly it says that the blob has changed...
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.
We are planning to use unicorn to setup the new instance after serialize all the items from sitecore from dev env. It was working fine without content tree. When we include the content tree we are getting the below issue. Is there a way to access the log info so that we would find out exactly which items throwing exception.
Default Configuration is being reserialized
[D] Clearing existing items from Serialization File System Data Store
[U] Serializing included items under root core:/sitecore/system/Field types (76e6d8c7-1f93-4712-872b-da3c96b808f2)
[U] Serializing included items under root core:/sitecore/system/Settings (087e1ea5-6280-4575-9e70-85b588db91b2)
[U] Serializing included items under root core:/sitecore/content/Documents and settings/All users (78415f9a-e2f7-4b61-8a99-81c75904f1b1)
[U] Serializing included items under root core:/sitecore/content/Applications (c74ac643-53c8-4f1e-9508-840cdc72aaca)
[U] Serializing included items under root master:/sitecore/layout (eb2e4ffd-2761-4653-b052-26a64d385227)
[S] master:/sitecore/layout/Simulators (39522e9a-9b6e-4cb4-850c-23d0d3adfd0c) because Item path exclusion rule
[S] master:/sitecore/layout/Renderings/System (f4008f10-bbb2-4565-b652-467491361d5a) because Item path exclusion rule
[S] master:/sitecore/layout/Layouts/System (6e14276a-fd7f-40ec-9880-4ea96135ae9d) because Item path exclusion rule
[U] Serializing included items under root master:/sitecore/system (13d6d6c6-c50b-4bbd-b331-2b04f1a58f21)
[S] master:/sitecore/system/Aliases (5f094fe4-cc4b-40fd-9377-9ab00e7f7ca5) because Item path exclusion rule
[S] master:/sitecore/system/Marketing Center (33cfb9ca-f565-4d5b-b88a-7cdfe29a6d71) because Item path exclusion rule
[S] master:/sitecore/system/Publishing targets (d9e44555-02a6-407a-b4fc-96b9026caadd) because Item path exclusion rule
[S] master:/sitecore/system/Tasks/Schedules (a705d262-5714-4880-9962-051e25f1416d) because Item path exclusion rule
[U] Serializing included items under root master:/sitecore/templates (3c1715fe-6a13-4fcf-845f-de308ba9741d)
[S] master:/sitecore/templates/System (4bf98ef5-1d09-4dd1-9afe-795f9829fd44) because Item path exclusion rule
[S] master:/sitecore/templates/Branches/System (c93c0945-607b-4916-b8d9-fe9f9ba783ca) because Item path exclusion rule
[U] Serializing included items under root master:/sitecore/content (0de95ae4-41ab-4d01-9eb0-67441b7c2450)
ERROR: One or more errors occurred. (System.AggregateException)
at Unicorn.SerializationHelper.DumpTreeInternal(IItemData root, IPredicate predicate, ITargetDataStore serializationStore, ISourceDataStore sourceDataStore, ILogger logger)
at Unicorn.SerializationHelper.DumpTree(IItemData item, IConfiguration configuration)
at Unicorn.ControlPanel.ReserializeConsole.Process(IProgressStatus progress)
Illegal characters in path. (System.ArgumentException)
at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
at System.IO.Path.GetDirectoryName(String path)
at Rainbow.Storage.SerializationFileSystemTree.WriteItem(IItemData item, String path)
at Unicorn.SerializationHelper.DumpItemInternal(IItemData item, IPredicate predicate, ITargetDataStore targetDataStore)
at Unicorn.SerializationHelper.<>c__DisplayClass5.b__4()
Completed. Want to return to the control panel?
Hi Kam,
We've recently updated to v2.0 and figured out an issue with an exclude path. Let's say we have the following exclude path
<exclude path="/sitecore/content/Configuration/Online Services" />
And the following items in the database:
Because Configuration
and Specifications
are included in serialization, on the file system a have a Configuration.item
file and also a folder called Configuration
with the Specifications
in. When I sync my database with this setup everything works well.
When I now delete the Specifications
folder, the result is that on my file system I only have the Configuration.item
. This seems to be common serialization behavior, because nothing in the Configuration
-Folder is serialized and so there is no need for creating this folder on the file system. But when I now sync my database, my folder Online Services
(which is excluded from the sync by my serialization.config
) will be deleted.
It seems that Unicorn only looks into the file system and because there are no child items serialized for the Configuration
folder, it also deletes all it's child, ignoring that the child item is excluded by the config.
Can you please have a look into it?
Many thanks and regards,
Kevin
I have unicorn 2.0.4 set up in sitecore 7.2, the config is standard but i have added a few extra include and exclude rules. unicorn seems to ignore the exclude rules when i publish an item or create it programmatically. if i just create an item in content editor it doesnt get created
It is not possible to build the SyncTool assembly. I tried to recreate the project file but have not been able to get it to it building...
I think the Kamsar.WebConsole library has changed and the sync-database.aspx has not been updated to reflect this. It has broken references to AuthenticationManager and ConfigurationManager.
We've setup Unicorn in our Sitecore dev environment to persist out our local SC changes to disk and sync between local instances. However, I've run into a problem where after I change an item in my local instance of Sitecore (I added 2 fields to a template), the change isn't persisted out to my serialization folder.
I've checked the serialization config, the root path is correct. I checked the predicate config, the path to my template is included in the serialization config. I checked the permissions on my serialization folder, they look correct. I even granted everyone full control temporarily; that didn't help. I checked the Sitecore logs, other than mentioning that the Unicorn.dll was loaded, no mention of Unicorn in the logs. This issue seems to only affect me, others on the team aren't experiencing the issue.
Unicorn sync works for me though, I'm able to successful import our serialized Sitecore data tree to my local instance of Sitecore. Unicorn also adds info to the logs for the sync.
I've cloned the Unicorn repo and am attempting to debug. What's the best place to set a break point to trap the on change handler of Unicorn so I can step through the code and see what's going on?
When I use a web-root-relative path in the seializationProvider an error occurs when the path name is longer than x. 'path is not under root'
The serializationProvider looks like this
<serializationProvider type="Unicorn.Serialization.Sitecore.Fiat.FiatSitecoreSerializationProvider, Unicorn" rootPath="~/../../Unicorn" singleInstance="true" />
Item path can look like this
/sitecore/templates/MyTemplates/Base templates/Base navigation items folder/New template with a long name/New long section name/New field name with a very very very long name
The full error looks like this
[Exception: path is not under the root]
Sitecore.Data.Serialization.PathUtils.GetShortPath(String path) +168
Sitecore.Data.Serialization.PathUtils.MapItemPath(String itemPath, String root) +383
Unicorn.Serialization.Sitecore.SerializationPathUtility.GetSerializedReferencePath(String rootDirectory, ISourceItem sourceItem) +93
Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.SerializeItem(ISourceItem item) +168
Unicorn.UnicornDataProvider.SerializeItemIfIncluded(ItemDefinition itemDefinition, String triggerReason) +126
Unicorn.UnicornSqlServerDataProvider.CreateItem(ID itemId, String itemName, ID templateId, ItemDefinition parent, CallContext context) +238
Sitecore.Data.DataProviders.DataProvider.CreateItem(ID itemID, String itemName, ID templateID, ItemDefinition parent, CallContext context, DataProviderCollection providers) +163
Sitecore.Nexus.Data.DataCommands.CreateItemCommand.Execute(ID itemId, String itemName, ID templateId, Item destination) +578
Sitecore.Data.Engines.DataCommands.CreateItemCommand.DoExecute() +108
Sitecore.Data.Engines.EngineCommand`2.Execute() +122
Sitecore.Data.Engines.DataEngine.CreateItem(String itemName, Item destination, ID templateId, ID newId) +98
Sitecore.Data.Managers.ItemProvider.CreateItem(String itemName, Item destination, ID templateId, ID newId, SecurityCheck securityCheck) +363
Sitecore.Data.Managers.ItemManager.CreateItem(String itemName, Item destination, ID templateId, ID newId, SecurityCheck securityCheck) +215
Sitecore.Data.Managers.ItemManager.CreateItem(String itemName, Item destination, ID templateId, ID newId) +169
Sitecore.Nexus.Data.DataCommands.AddFromTemplateCommand.��(String ��, Item �, ID ��, ID ��) +12
Sitecore.Data.Engines.DataCommands.AddFromTemplateCommand.DoExecute() +114
Sitecore.Data.Engines.EngineCommand`2.Execute() +122
Sitecore.Data.Engines.DataEngine.AddFromTemplate(String itemName, ID templateId, Item destination, ID newId) +102
Sitecore.Data.Managers.ItemProvider.AddFromTemplate(String itemName, ID templateId, Item destination, ID newId) +364
Sitecore.Data.Managers.ItemManager.AddFromTemplate(String itemName, ID templateId, Item destination, ID newItemId) +204
Sitecore.Data.Managers.ItemManager.AddFromTemplate(String itemName, ID templateId, Item destination) +287
Sitecore.Data.Items.Item.Add(String name, TemplateID templateID) +146
Sitecore.Data.Items.TemplateSectionItem.AddField(String fieldName) +266
Sitecore.Shell.Applications.Templates.TemplateBuilder.TemplateBuilderForm.SaveField(TemplateSectionItem sectionItem, FieldDefinition field) +213
Sitecore.Shell.Applications.Templates.TemplateBuilder.TemplateBuilderForm.SaveSection(TemplateItem templateItem, SectionDefinition section) +561
Sitecore.Shell.Applications.Templates.TemplateBuilder.TemplateBuilderForm.SaveTemplate() +773
Sitecore.Shell.Applications.Templates.TemplateBuilder.TemplateBuilderForm.Save(ClientPipelineArgs args) +1183
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +76
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +211
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) +398
Sitecore.Pipelines.Pipeline.Start(PipelineArgs args, Boolean atomic) +327
Sitecore.Web.UI.Sheer.ClientPage.RunPipelines() +271
Sitecore.Web.UI.Sheer.ClientPage.OnPreRender(EventArgs e) +547
System.Web.UI.Control.PreRenderRecursiveInternal() +113
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4297
Hi Kamsar,
We have around 15000 items created by us in sitecore.
The database size for master database is around 6 GB.
It takes around 5 hours to complete the sync operation.
We have already mitigated the system out of memory exception by increasing the ram ,etc.
Please suggest ways to reduce the sync time.
We have excluded item for time being in order to process items faster.
Many Thanks
Hi
I did an upgrade from Sitecore 7.1 to 7.2
Sitecore changed the whole Speak item structure within the core:/sitecore/client path.
The path to our serialization folder is 50 characters long. One of the new items in 7.2 is the following path:
core:/sitecore/client/Business Component Library/Layouts/Renderings/Structures/Page Structures/Application/Dashboard/Dashboard Parameters/__Standard Values
Because this (and some other) path is longer than 248 characters, the item gets serialized within an cryptic folder (1F683D41) directly on the root of the serialization folder:
This is the Sitecore way of handling these long paths. This is the first Sitecore release where we face this behavior. To date, Sitecore had only shortened the Dictionary items which where to long within the particular character folder (for example O).
"Problem":
When i execute sync-database.aspx, all those items gets first deleted because they are not found. In a second step they get added as new items because they are found in the root folder:
This behavior has not really an impact onto the functionality of the sync. But it is confusing for the developer and a bit error prone. Developers tend to ignore these messages after a while and oversee an actual error if it occurs.
Feature request: Is it possible to handle these situations and do nothing? Because there is nothing to do :)
Regards,
Pascal
Hey
Very good work on Unicorn.
You could consider the following improvement.
When using clones in Sitecore, you will experience that the links between the clones are not persisted when deserializing items into Sitecore again, hence clone notifications no longer work.
This has been documented in the support database.
The solution to this is simply to rebuild the link database.
A simple - Globals.LinkDatabase.Rebuild(database); would propably solve the problem.
You could consider adding a setting to the serialization.config, that allows you to do a rebuild of the links database upon a successfull Unicorn sync.
Using Sitecore 6.5 Sitecore.Kernel.dll
In SerializationLoader, cannot resolve
using Sitecore.Data.Serialization.Exceptions
Which version of Sitecore does Unicorn require?
Hi,
Do you have a suggested approach for publishing content sync'd to the master database after a sync triggered by CI server? Previously I just added the publish code into the old unicorn.aspx file but now as this is a handler I can't do this.
It seems like it would be a common requirement, otherwise you can't actually do a full hands-free deployment because you'd have to manually do a site publish to get the new templates/layouts live. How do you handle this? A bool in the config for "publish master predicate paths after sync" would make sense to me? If you like I could fork and add this.
Thanks
Andy
When going to the Unicorn.aspx page Sitecore isn't able to resolve my Core database items if I have LiveMode.config in my Include folder (content of LiveMode.config is at the bottom of the issue).
I'm using the OOTB Serialization.config, apart from the /sitecore/unicorn/configurations/configuration[@name='default configuration']/predicate node. In that node I have the following:
<include database="core" path="/sitecore/Client"/>
<include database="core" path="/sitecore/Client/Your Apps/Reporting"/>
<include database="core" path="/sitecore/Client/Sitecore/Applications/Launch Pad/Page Settings/Shortcuts/Analytics"/>
<include database="master" path="/sitecore/system/settings/analytics/dashboard reports/analytics reports">
I have no additional Include files for my SPEAK app, and am running Sitecore 7.1 Initial Release. All config files are Sitecore OOTB files.
LiveMode.config:
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/">
<sitecore>
<sites>
<site name="website">
<patch:attribute name="database">master</patch:attribute>
<patch:attribute name="filterItems">true</patch:attribute>
<patch:attribute name="enableWorkflow">true</patch:attribute>
</site>
</sites>
</sitecore>
</configuration>
I see in your code that you support deserialization of named presets through a query string parameter (in the sync tool), but the serialization part on the events only seems to consider the default preset. Am I missing something? Thank you very much for your answer, there will be follow up questions ;)
I moved a template from a folder which is not syncronised by Unicorn, into a folder that is synchronised, and got this exception:
Server Error in '/' Application.
Could not find a part of the path 'C:\workingsvn\website\trunk\src\website\website.Website\App_Data\Serialization\master\sitecore\templates\website\Base\website Base'.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.IO.DirectoryNotFoundException: Could not find a part of the path 'C:\workingsvn\website\trunk\src\website\website.Website\App_Data\Serialization\master\sitecore\templates\website\Base\website Base'.
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[DirectoryNotFoundException: Could not find a part of the path 'C:\workingsvn\website\trunk\src\website\website.Website\App_Data\Serialization\master\sitecore\templates\website\Base\website Base'.]
System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath) +667
System.IO.FileSystemEnumerableIterator1.CommonInit() +162 System.IO.FileSystemEnumerableIterator
1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler1 resultHandler, Boolean checkHost) +667 System.IO.DirectoryInfo.InternalGetFileSystemInfos(String searchPattern, SearchOption searchOption) +88 Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.DeleteSerializedItem(ISerializedReference item) +159 Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.MoveSerializedItem(ISourceItem sourceItem, ISourceItem newParentItem) +666 Unicorn.UnicornDataProvider.MoveItem(ItemDefinition itemDefinition, ItemDefinition destination, CallContext context) +349 Unicorn.UnicornSqlServerDataProvider.MoveItem(ItemDefinition itemDefinition, ItemDefinition destination, CallContext context) +192 Sitecore.Data.DataProviders.DataProvider.MoveItem(ItemDefinition item, ItemDefinition destination, CallContext context, DataProviderCollection providers) +137 Sitecore.Data.DataSource.MoveItem(ID itemID, ID destinationID) +212 Sitecore.Data.Engines.EngineCommand
2.Execute() +119
Sitecore.Data.Managers.ItemProvider.MoveItem(Item item, Item destination, SecurityCheck securityCheck) +390
Sitecore.Shell.Framework.Pipelines.DragItemTo.Execute(ClientPipelineArgs args) +250
[TargetInvocationException: Exception has been thrown by the target of an invocation.]
System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor) +0
System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments) +56
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +565
System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters) +35
Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) +389
Sitecore.Web.UI.Sheer.ClientPage.ResumePipeline() +357
Sitecore.Web.UI.Sheer.ClientPage.OnPreRender(EventArgs e) +456
Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e) +25
System.Web.UI.Control.PreRenderRecursiveInternal() +180
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4048
Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.18446
Is this a bug?
Thanks
Every time I do a re-sync, the following is displayed in the output:
[U] master:/sitecore/layout/Sublayouts/Websites/Horeca Toolbox/Social Content Generator/SCG About (427141c2-a17c-48e6-80a3-628716e3ca83)
> Field Placeholder - Serialized content, Source
In the source database this field value is equal to 'content', it is shared and not a standard value, it is set in the item.
In the target database this field value is also equal to 'content' but here it is a shared field and a standard value, so not yet set in the item.
When I create a new sublayout in the source database the field value is set to 'content', a shared field and also a standard value.
When Unicorn does a sync with the target it reads an empty value from the item (correct). But persisting the 'content' value from the serialized item is not done because perhaps Sitecore sees it already as a standard value and skips the saving of the value in the item?
This issue seems to have some resemblance with the __Lock field issue.
I have the same issue with other fields like __SortOrder where the value is set in the item but equal to the original standard value. I am now solving this issue by fixing it in the source database by resetting these fields back to the original standard values.
Could not install package 'Unicorn 1.0.6.0'. You are trying to install this package into a
project that targets '.NETFramework,Version=v4.0', but the package does not contain any assembly references that
are compatible with that framework. For more information, contact the package author
Hi,
After I configured Unicorn to use shared serialization preset it started to throw exception. The configuration I did is:
<predicate type="Unicorn.Predicates.SerializationPresetPredicate, Unicorn" presetName="default" singleInstance="true" />
and
<sitecore>
<serialization>
<default>
<include database="core" path="/sitecore/system/Field types"/>
</default>
</serialization>
</sitecore>
The exception thrown is:
Error activating IPredicate using binding from IPredicate to SerializationPresetPredicate
Several constructors have the same priority. Please specify the constructor using ToConstructor syntax or add an Inject attribute.
Constructors:
SerializationPresetPredicate(string presetName)
SerializationPresetPredicate(XmlNode configNode)
I probably misunderstood how to configure it, but have no other idea how to make it work. Could you help?
It'd be nice to have [Updated] and [Added] in the log instead of just [Forced], which probably doesn't mean much to folks who haven't dived into the serialization loading APIs ;)
Hi Kam,
I recently found that the current version of Unicorn does not ignore the fields for the revision and updated by. But according to the README on the repository root they should. This means that for every save all the affected items are synced again also if only the revision has changed.
I've also tried to ignore the fields in the configuration, but this has no impact:
<fieldPredicate type="Unicorn.Predicates.ConfigurationFieldPredicate, Unicorn" singleInstance="true">
<exclude fieldID="{8CDC337E-A112-42FB-BBB4-4143751E123F}" note="Revision" />
<exclude fieldID="{D9CF14B1-FA16-4BA6-9288-E8A174D4D522}" note="Updated" />
<exclude fieldID="{BADD9CF9-53E0-4D0C-BCC0-2D784C282F6A}" note="Updated by" />
</fieldPredicate>
I'm using Unicorn 2.0.3. Can you reproduce this or is this an issue on my side?
Thanks for looking into it,
Kevin
IsAuthorized method has reference to "correctAuthToken". Build reports:
The name 'correctAuthToken' does not exist in the current context C:\Projects\Unicorn\Source\Sync Tool\sync-database.aspx.cs
Due to a known issue with Invoke-WebRequest on Azure we have to do this:
$req = [System.Net.WebRequest]::Create($url)
$req.Headers.Add("Authenticate", $deploymentToolAuthToken)
$result = $req.GetResponse()
And invoke the WebRequest object directly. Powershell is doing something with IO buffers that is borked on Azure:
Everything else works great, thought a note on the ReadMe would be nice. Thanks!
Hi,
I've been using Unicorn in my latest Sitecore implementation and it's been a great help.
One thing I'd love to see added though is a means to serialize and revert specific domains, roles and users with Unicorn.
Typically I leave the Sitecore domains and roles alone, but for most projects I usually add a domain for the project and some roles for them, and also include those roles into my source control.
Sitecore serializes those into a \serialization\security\ folder.
It would be cool if the Unicorn serialization.config would
%lt;include database="security" path="/xyz/Roles/ContactRole" /%gt;
%lt;include database="security" path="/xyz/Roles/LeadRole" /%gt;
%lt;include database="security" path="/xyz/Users/CustomerAdminUser" /%gt;
Kind regards,
Steps to reproduce:
This will give an error similar to this:
Duplicate serialized item IDs were detected ({10CDD112-2E0D-4B6B-B523-C5B7D37E70A7}) - this usually indicates corruption in the serialization provider data.
Item 1: master:/sitecore/templates/Foo ({10CDD112-2E0D-4B6B-B523-C5B7D37E70A7})
Item 1 ProviderId: d:\web\paygrounds\sc72rev14122610\Data\serialization\master\sitecore\templates\Foo.item
Item 2: master:/sitecore/templates/Foo ({10CDD112-2E0D-4B6B-B523-C5B7D37E70A7})
Item 2 ProviderId: d:\web\paygrounds\sc72rev14122610\Data\serialization\master\sitecore\templates\Foo_10CDD1122E0D4B6BB523C5B7D37E70A7.item
ERROR: Consistency check failed - aborting loading. (Unicorn.Loader.ConsistencyException)
at Unicorn.Loader.SerializationLoader.DoLoadItem(ISerializedItem serializedItem, IConsistencyChecker consistencyChecker)
at Unicorn.Loader.SerializationLoader.LoadOneLevel(ISerializedReference root, IDeserializeFailureRetryer retryer, IConsistencyChecker consistencyChecker)
at Unicorn.Loader.SerializationLoader.LoadTreeRecursive(ISerializedReference root, IDeserializeFailureRetryer retryer, 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)
The problem is that there are 3 serialized items file:
The problem is that Sitecores PathUtils.GetDirectoryPath
returns a path without ID as long as there is only one item in the DB with the same path, but as soon as there are two items with the same path it will return a path with the GUID inside.
Hello,
We use unicorn in combination with Visual Studio 2013 and TFS 2013.
When I make a change to an existing item in Sitecore, Unicorn tries to change the associated item on disk, but then raises an error: access to the path ... is denied. Also, the item in the serialization project is NOT checked out.
My Workspace is a "server workspace". All items on disk are read-only. Unicorn seems to have no rights to check out an item, make the item on disk writable and write changes to it.
Other developers in my team have a "local workspace". All their items on disk have the read-only flag NOT set. Unicorn is able to check the item out in TFS and make changes to the file on disk.
But I want to keep using a server workspace. Its performance is better when you have lots of items. TFS 2013 introduced the concept of a local workspace. Workspaces in earlier TFS versions were always on the server.
Is Unicorn not capable of working in combination with a TFS server workspace?
Thank you for your advice!
Greetings,
Jeroen
We have a setup where developers check in the serialized folder contents, example content items and template items, to source control (Git on Visual Studio Online). A build server pushes this to a test machine (TeamCity builds nuget packages and Octopus Deploy deploys them). We are seeing the following error:
Issue: When a developer creates a template and a content item at the same time. Unicorn will say that the template does not exist for the item and stop. This is caused by the ordering of the nodes in the "serialization.config" file and can be resolved by moving templates up above content. But what happens if the dependencies cross boundaries and the ordering of nodes need to be dynamic? Is the dependency graph inside Unicorn able to handle dependencies like this in the sync, or are users/CI systems supposed to stage items in correct order based on dependencies?
The following logic for the OnItemMoved method looks like it might cause a problem:
if (DisabledLocally) return;
// [0] is the moved item, [1] is the ID of the previous parent item
var item = Event.ExtractParameter<Item>(e, 0);
var oldParentId = Event.ExtractParameter<ID>(e, 1);
if (item == null || oldParentId == (ID)null) return;
var oldParent = item.Database.GetItem(oldParentId);
if (oldParent == null) return;
if (!Presets.Includes(item)) return;
The system checks the preset location of the new item and if the new location is not in the presets then it returns:
if (!Presets.Includes(item)) return;
However this causes a problem if the item was in a preset location and then moved out of the preset locations. The item on disk in this scenario won't actually be removed.
In this scenario the old serialized item should be deleted.
Hi,
I am currently testing version 3.0-rc5 in combination with Sitecore 6.6.
All seems to work fine but I am now experiencing an issue with __Lock fields which seem to fail the check if the need to be updated.
I have the following item, taken from the Unicorn output:
[U] master:/sitecore/templates/Branches/User Defined/Websites/Horeca Toolbox/Quiz/Quiz root/$name/Winner slide (553fcbf5-1834-4707-8fcb-90c0eaf97bf9)
> Field __Lock - nl#1: Serialized , Source
How many times I do a re-sync, it keeps throwing this message. It also does this with other __Lock fields of other items.
The serialized data contains:
- Language: nl
Versions:
- Version: 1
Fields:
- ID: 001dd393-96c5-490b-924a-b0f25cd9efd8
# __Lock
Value: <r />
It does have a value equal to but this is not present in the Unicorn output. Perhaps HTML tags are not displayed properly?
Data in target Sitecore environment before and after sync:
nl version of item: <r />
en version of item:
en-gb version of item: this language version was not created
As you can see the nl version already contains <r /> and the serialized data does as well. But Unicorn still want to update this field with every sync.
Any ideas?
Kind regards,
Dennis
On a blank install of Sitecore 7.2 140526, and uCommerce 6, I get the following exception "Unknown connection string. Name: '$(1)'". We suspect it may be something to do with the fact that uCommerce items are also data provided and live under /sitecore/ucommerce
Can you point us in the right direction?
Thanks for the great module,
Steve
[InvalidOperationException: Unknown connection string. Name: '$(1)']
Sitecore.Configuration.Settings.GetConnectionString(String connectionStringName) +364
Sitecore.Configuration.Factory.CreateFromConnectionStringName(XmlNode configNode, String[] parameters, Boolean assert) +106
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +164
Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) +117
Sitecore.Configuration.Factory.GetConstructorParameters(XmlNode configNode, String[] parameters, Boolean assert) +206
Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) +106
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +141
Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +666
Sitecore.Configuration.Factory.CreateFromReference(XmlNode configNode, String[] parameters, Boolean assert) +198
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +118
Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) +1090
Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +577
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +296
Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +666
Sitecore.Configuration.Factory.GetDatabase(String name, Boolean assert) +185
Sitecore.Configuration.Factory.GetDatabases() +168
Sitecore.Data.Managers.HistoryManager.InitializeEventHandlers() +49
Sitecore.Pipelines.Loader.InitializeManagers.Process(PipelineArgs args) +38
(Object , Object[] ) +80
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +365
Sitecore.Nexus.Web.HttpModule.Application_Start() +172
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +516
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +530
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +304
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +404
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +475
[HttpException (0x80004005): Unknown connection string. Name: '$(1)']
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +12601936
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +159
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +12441597
Hi
I made an Sitecore upgrade from 7.1 to 7.2 with Unicorn enabled.
Some things i was faced with while upgrading:
The problem: we have some excluded paths in the content folder of the master database. These item trees are modified by the customer. The root items of these exclude paths are manually serialized within the Developer tab because they are necessary for other developers and the Sitecore Courier Module (http://sitecorecourier.codeplex.com/) to generate these items on the target system.
Now if we delete the content of the serialization folder and make a complete new serialization, these items are missing in the file system and they will generate a huuuuuge mess on the target system when Sitecore Courier will make a item package, which tells the system to remove that items and their childs (The whole websites).
Can you give me an advice how you work with Unicorn when you have items which need to be handled by the customer? Especially the root item of the exclude paths. If we don't have them on disk, the customer has no chance to get them initially. If we serialize them manually, we have a shaky serialization when we have to clean the whole serialization folder.
How do you do that? Are we missing a huge key point?
We have been evaluating Unicorn for a while now and it seems to be working rather well, except that when we add/edit/delete a field within Sitecore our pending changes list shows a lot of edits that are just the version, revision and date updated for that particular template e.g:
----version----
language: en
version: 1
revision: f09e2cd1-7c20-409d-9fdf-65778c8f336d
----field----
field: {8CDC337E-A112-42FB-BBB4-4143751E123F}
name: __Revision
key: __revision
content-length: 36
31a9c5c9-672b-4c7b-9841-59b08d140165
----field----
field: {D9CF14B1-FA16-4BA6-9288-E8A174D4D522}
name: __Updated
key: __updated
content-length: 34
20140902T094036:635452476360564977
I'm not entirely sure if we are missing some piece of config or if this is even avoidable but it seems fair enough, it's just I read the inconsequential changes feature and it sounds like it would prevent these changes?
Hi Kam
We're writing some Sitecore Content Editor Helpers for Unicorn right now.
Now, would you be comfortable if we would add these client extensions to the Unicorn project (through PR) - it will ship with serialized items, additional icons and configs and thus we would need to extend the file structure and nuspec of the project. Or should we create a new "Unicorn Extension" repo/project, hosted elsewhere for that?
Thanks for your feedback,
[InvalidOperationException: The physical root path of this SFS tree, D:\Projects\Sitecore\src\abcorp-site\abcorp.sitecore.abc\data\Unicorn\Default Configuration\Field types, is longer than the configured max base path length 90. If the tree contains any loopback paths, unexpected behavior may occur. You should increase the Serialization.SerializationFolderPathMaxLength setting to greater than 103 and perform a reserialization from a master content database.]
Rainbow.Storage.SerializationFileSystemTree.get_MaxRelativePathLength() +233
Rainbow.Storage.SerializationFileSystemTree.get_MaxItemNameLengthBeforeTruncation() +61
Rainbow.Storage.SerializationFileSystemTree.PrepareItemNameForFileSystem(String name) +58
System.Linq.WhereSelectArrayIterator2.MoveNext() +84 System.Linq.Buffer
1..ctor(IEnumerable1 source) +176 System.Linq.Enumerable.ToArray(IEnumerable
1 source) +77
Rainbow.Storage.SerializationFileSystemTree.GetPhysicalFilePathsForVirtualPath(String virtualPath) +224
Rainbow.Storage.SerializationFileSystemTree.GetItemsByPath(String globalPath) +87
Rainbow.Storage.SerializationFileSystemDataStore.GetByPath(String path, String database) +48
Unicorn.Data.ConfigurationDataStore.GetByPath(String path, String database) +28
Unicorn.Predicates.PredicateRootPathResolver.GetRootSerializedItems() +78
Unicorn.ControlPanel.ControlPanelUtility.HasAnySerializedItems(IConfiguration configuration) +36
System.Linq.Enumerable.All(IEnumerable1 source, Func
2 predicate) +146
Unicorn.ControlPanel.d__0.MoveNext() +109
Unicorn.ControlPanel.UnicornControlPanelPipelineProcessor.ProcessRequest(HttpContext context) +473
Unicorn.ControlPanel.UnicornControlPanelPipelineProcessor.Process(HttpRequestArgs args) +74
(Object , Object[] ) +59
Sitecore.Pipelines.PipelineMethod.Invoke(Object[] parameters) +36
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +241
Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args, String pipelineDomain, Boolean failIfNotExists) +158
Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args, String pipelineDomain) +64
Sitecore.Pipelines.CorePipeline.Run(String pipelineName, PipelineArgs args) +50
Sitecore.Nexus.Web.HttpModule.��(Object ��, EventArgs ��) +450
System.Web.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +141
System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously) +69
I have problems as above, its releated to the length of path.
I changed :
- "Serialization.SerializationFolderPathMaxLength" from web.config.
- "Rainbow.SFS.SerializationFolderPathMaxLength" from Rainbow.config.
but everything still got the errors. Please help me !
Ver :
- Unicorn.3.0.0-rc4, Unicorn.Core.3.0.0-rc4
- Sitecore 8 Update 4
We're happily using unicorn for a sitecore 7 project, but it fails to properly serialize the subfolders of buckets, something which clicking "Serialize Tree" in sitecore doesn't seem to have issues with.
Would be awesome if you could look into that!
I tried to install Unicorn 3.0 RC
below is the nuget package details
We are in the process of the auto deployment process with unicorn. It would be more helpful for us to resolve this issue.
I have also tried with sample config which are included while install the nuget package.
Server Error in '/' Application.
Could not resolve type name: Unicorn.UnicornSqlServerDataProvider, Unicorn (method: Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)).
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Exception: Could not resolve type name: Unicorn.UnicornSqlServerDataProvider, Unicorn (method: Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)).
Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
Stack Trace:
[Exception: Could not resolve type name: Unicorn.UnicornSqlServerDataProvider, Unicorn (method: Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)).]
Sitecore.Diagnostics.Error.Raise(String error, String method) +137
Sitecore.Configuration.Factory.CreateType(XmlNode configNode, String[] parameters, Boolean assert) +293
Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert) +58
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +131
Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +579
Sitecore.Configuration.Factory.CreateFromReference(XmlNode configNode, String[] parameters, Boolean assert) +137
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +109
Sitecore.Configuration.Factory.GetInnerObject(XmlNode paramNode, String[] parameters, Boolean assert) +961
Sitecore.Configuration.Factory.AssignProperties(XmlNode configNode, String[] parameters, Object obj, Boolean assert, Boolean deferred, IFactoryHelper helper) +552
Sitecore.Configuration.Factory.CreateObject(XmlNode configNode, String[] parameters, Boolean assert, IFactoryHelper helper) +275
Sitecore.Configuration.Factory.CreateObject(String configPath, String[] parameters, Boolean assert) +579
Sitecore.Configuration.Factory.GetDatabase(String name, Boolean assert) +144
Sitecore.Configuration.Factory.GetDatabase(String name) +42
Sitecore.Configuration.Factory.GetDatabases() +98
Sitecore.Data.Managers.HistoryManager.InitializeEventHandlers() +35
Sitecore.Pipelines.Loader.InitializeManagers.Process(PipelineArgs args) +41
(Object , Object[] ) +71
Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args) +331
Sitecore.Nexus.Web.HttpModule.Application_Start() +228
Sitecore.Nexus.Web.HttpModule.Init(HttpApplication app) +673
System.Web.HttpApplication.RegisterEventSubscriptionsWithIIS(IntPtr appContext, HttpContext context, MethodInfo[] handlers) +618
System.Web.HttpApplication.InitSpecial(HttpApplicationState state, MethodInfo[] handlers, IntPtr appContext, HttpContext context) +172
System.Web.HttpApplicationFactory.GetSpecialApplicationInstance(IntPtr appContext, HttpContext context) +419
System.Web.Hosting.PipelineRuntime.InitializeApplication(IntPtr appContext) +343
[HttpException (0x80004005): Could not resolve type name: Unicorn.UnicornSqlServerDataProvider, Unicorn (method: Sitecore.Configuration.Factory.CreateFromTypeName(XmlNode configNode, String[] parameters, Boolean assert)).]
System.Web.HttpRuntime.FirstRequestInit(HttpContext context) +579
System.Web.HttpRuntime.EnsureFirstRequestInit(HttpContext context) +120
System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context) +712
if i rename a template that already has fields created on it and hit save, the sub-items try to be serialized to a folder under the new name of the template but this does not yet exist so the serialization fails and on the next sync the fields for the template are deleted
Hi Kam,
yesterday I've changed the template of an item to a new template and deleted my old template. Unfortunately the "template change" on the item was not triggered by Unicorn. So after calling sync-database.aspx on a different installation I could not load the item anymore, because it still referenced the old template which does not exists anymore. The result was, that the item could not be synced and was deleted afterwards.
Can you please have a look at it? Or is this not a bug and I have to sync manually after changing the template of an item? If yes, it is possible to skip sync of this item with an error/warning, but let the item in the database? I mean, if someone forgot to sync the item manually, the item would still be there :)
King regards,
Kevin
After installing the lastest version https://www.nuget.org/packages/Unicorn/3.0.0-beta04 in a Sitecore 8 Update 5 website the following error occurs when starting the site.
Unicorn.aspx is also not accessible because of the error.
Unicorn configuration is default. In the data folder a Rainbow folder is automatically created.
Stacktrace from the Sitecore Log:
8616 19:18:09 ERROR Application error.
Exception: System.InvalidOperationException
Message: The parent item of /sitecore/system/Sites/scheduler was not serialized. You cannot have a sparse serialized tree.
Source: Rainbow
at Rainbow.Storage.SerializationFileSystemTree.GetTargetPhysicalPath(IItemData item)
at Rainbow.Storage.SerializationFileSystemTree.Save(IItemData item)
at Unicorn.UnicornDataProvider.SaveItem(ItemDefinition itemDefinition, ItemChanges changes, CallContext context)
at Unicorn.UnicornSqlServerDataProvider.SaveItem(ItemDefinition itemDefinition, ItemChanges changes, CallContext context)
at Sitecore.Data.DataProviders.DataProvider.SaveItem(ItemDefinition item, ItemChanges changes, CallContext context, DataProviderCollection providers)
at Sitecore.Data.DataSource.SaveItem(ID itemID, ItemChanges changes)
at Sitecore.Data.Engines.EngineCommand2.Execute() at Sitecore.Data.Engines.DataEngine.SaveItem(Item item) at Sitecore.Data.Managers.ItemProvider.SaveItem(Item item) at Sitecore.Data.Managers.PipelineBasedItemProvider.ExecuteAndReturnResult[TArgs,TResult](String pipelineName, String pipelineDomain, Func
1 pipelineArgsCreator, Func`1 fallbackResult)
at Sitecore.Data.Managers.PipelineBasedItemProvider.SaveItem(Item item)
at Sitecore.Data.Items.ItemEditing.AcceptChanges(Boolean updateStatistics, Boolean silent)
at Sitecore.Data.Items.ItemEditing.EndEdit(Boolean updateStatistics, Boolean silent)
at Sitecore.Shell.Framework.Sorting.SetSortorder(Item item, Int32 sortorder)
at Sitecore.Shell.Framework.Sorting.MoveLast(Item[] items)
at Sitecore.Sites.MultiSitesManager.ArrangeSitesContext()
at Sitecore.Sites.MultiSitesManager.Process(HttpRequestArgs args)
at (Object , Object[] )
at Sitecore.Pipelines.CorePipeline.Run(PipelineArgs args)
at Sitecore.Nexus.Web.HttpModule.��(Object ��, EventArgs ��)
at System.Web.HttpApplication.SyncEventExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
i have recently had a sitecore build tested by external penetration testers, one of the suggestions was to add the header;
X-Content-Type-Options: nosniff
to the custom headers section of the web.config.
if i do this and try to navigate to the unicorn console it renders the entire page as text. I'm assuming that no content type is being sent in the request
If you change the config file after the initial serialization the module will not check if items are serialized or not.
I've already created some items and then decided I'll need them serialized so I've changed the config file, but the new paths didn't show up on the disk until I've done a change to all the items in question.
We are finding the sync is slow for a large amount of content (~1GB). We found this could take several hours at least, even on high end machines. Is this a Sitecore problem or a Unicorn problem? This is less of an issue and a question as to whether you or someone has investigated where the bottleneck is. If the bottleneck is Sitecore and there's nothing that can be done I won't investigate further, however if the bottleneck is Unicorn I'm more than happy to spend some time investigating whether not I can improve it.
Also if the bottleneck is Sitecore, have you looked at the level of difficulty in overwriting the serialization provider or using the Item Web API? I think I looked at this about a year ago and concluded there were enough blackbox things going on with the serialization provider that a wholesale overhaul would run into strange problems, similar to overhauling the DataProvider.
What license is this released under? Was wondering if it was available for commercial use.
Hi Kam
Some troubles again ;-) This time with moving templates. I've created a clean Sitecore 7.2 installation with Unicorn 2.0.2 and the default configuration. I've created a new template MovingTest
in /sitecore/templates/Sample/MovingTest
with one field and standard values. This all was correctly serialized, see this images:
Then I moved the complete template to another folder /sitecore/templates/User Defined
. While doing this I'm loosing almost all informations about the item on the diks. The only file which remains on the disk is the MovingItem.item
file, the folder MovingItem
with the field definitions and the standard values is missing. In Sitecore all looks fine. See the following images:
Sometimes (not always) I also got an error in Sitecore when I want to move the item (see the stacktrace at the end):
When receiving this error, the item was not moved, but the MovingTest
folder on the disk is already deleted.
Can you please have a look into this?
Thanks and greets,
Kevin
Stacktrace:
4236 10:23:06 INFO AUDIT (sitecore\admin): Drag item: master:/sitecore/templates/Sample/MovingTest, language: en, version: 1, id: {1E4F4958-5B0A-49E3-8F11-BBBFA99088B2} to master:/sitecore/templates/User Defined, language: en, version: 1, id: {B29EE504-861C-492F-95A3-0D890B6FCA09}
4236 10:23:06 ERROR Application error.
Exception: System.Web.HttpUnhandledException
Message: Exception of type 'System.Web.HttpUnhandledException' was thrown.
Source: System.Web
at System.Web.UI.Page.HandleError(Exception e)
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
at System.Web.UI.Page.ProcessRequest()
at System.Web.UI.Page.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
Nested Exception
Exception: System.Reflection.TargetInvocationException
Message: Exception has been thrown by the target of an invocation.
Source: mscorlib
at System.RuntimeMethodHandle.InvokeMethod(Object target, Object[] arguments, Signature sig, Boolean constructor)
at System.Reflection.RuntimeMethodInfo.UnsafeInvokeInternal(Object obj, Object[] parameters, Object[] arguments)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Reflection.MethodBase.Invoke(Object obj, Object[] parameters)
at Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline)
at Sitecore.Web.UI.Sheer.ClientPage.ResumePipeline()
at Sitecore.Web.UI.Sheer.ClientPage.OnPreRender(EventArgs e)
at Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e)
at System.Web.UI.Control.PreRenderRecursiveInternal()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
Nested Exception
Exception: System.IO.DirectoryNotFoundException
Message: Could not find a part of the path 'D:\Sitecore\Playgrounds\unicorn\Data\serialization\master\sitecore\templates\Sample\MovingTest'.
Source: mscorlib
at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
at System.IO.FileSystemEnumerableIterator`1.CommonInit()
at System.IO.FileSystemEnumerableIterator`1..ctor(String path, String originalUserPath, String searchPattern, SearchOption searchOption, SearchResultHandler`1 resultHandler, Boolean checkHost)
at System.IO.Directory.InternalGetFileDirectoryNames(String path, String userPathOriginal, String searchPattern, Boolean includeFiles, Boolean includeDirs, SearchOption searchOption, Boolean checkHost)
at System.IO.Directory.InternalGetFiles(String path, String searchPattern, SearchOption searchOption)
at Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.<GetChildReferences>b__0(String path)
at Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.GetChildReferences(ISerializedReference parent, Boolean recursive)
at Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.DeleteItemRecursive(ISerializedReference reference)
at Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.DeleteSerializedItem(ISerializedReference item)
at Unicorn.Serialization.Sitecore.SitecoreSerializationProvider.MoveSerializedItem(ISourceItem sourceItem, ISourceItem newParentItem)
at Unicorn.UnicornDataProvider.MoveItem(ItemDefinition itemDefinition, ItemDefinition destination, CallContext context)
at Unicorn.UnicornSqlServerDataProvider.MoveItem(ItemDefinition itemDefinition, ItemDefinition destination, CallContext context)
at Sitecore.Data.DataProviders.DataProvider.MoveItem(ItemDefinition item, ItemDefinition destination, CallContext context, DataProviderCollection providers)
at Sitecore.Data.DataSource.MoveItem(ID itemID, ID destinationID)
at Sitecore.Data.Engines.EngineCommand`2.Execute()
at Sitecore.Data.Managers.ItemProvider.MoveItem(Item item, Item destination, SecurityCheck securityCheck)
at Sitecore.Shell.Framework.Pipelines.DragItemTo.Execute(ClientPipelineArgs args)
In Sitecore 8.0 rev. 150223 the following warning is thrown in the Sitecore log file.
As Unicorn is dependent of Ninject, Version 3.0.1.10 these two are not working very well together. Can you upgrade Ninject to version 3.2.0.0 in the unicorn solution?
Hi,
We experience a conceptual issue / missing feature of Unicorn (This is a Feature request =)).
If i change the sharing setting of a field from Shared to Versioned, Sitecore triggers a background job to move all field data of this field from the SharedFields into the VersionedFields table. The sharing type is correctly changed and serialized trough Unicorn. Everything is fine on my machine.
Howevery, if another developer deserialises the changes on his machine, the field is set to unshared, but the data remains in the SharedFields table which makes field value changes impossible on the depending items. Every time you want to change an item value (the shared value is shown in every version), the change is silently ignored and the old value appears again after reloading the item.
There are some methods in the FieldSharingConverter class (which is placed inside the SqlDataProvider class) to change the values for a specific field id (e.g. MakeVersioned with a parameter in which the old sharing type is provided). Those methods seem to be triggered in the Content Editor after changing such a sharing flag.
Feature request:
Detect changes in the field sharing settings while syncing and update the database inside your DataProvider to leave the items intact (This can be an asynchronous task per changed field).
Regards,
Pascal
Hi Kam,
I got a NullReferenceException while synchronizing items.
Exception:
[U] master:/sitecore/templates/System/Language (f68f13a6-3395-426a-b9a1-fa2dc60d94eb)
ERROR: Object reference not set to an instance of an object. (System.NullReferenceException)
at Unicorn.Evaluators.DefaultSerializedAsMasterEvaluatorLogger.VersionedFieldIsChanged(IItemData serializedItemData, IItemVersion version, Guid fieldId, String serializedValue, String sourceValue)
at Unicorn.Evaluators.SerializedAsMasterEvaluator.<>c__DisplayClass12.b__6(ISerializedAsMasterEvaluatorLogger log)
at Unicorn.Logging.DeferredLogWriter`1.ExecuteDeferredActions(TLog log)
at Unicorn.Evaluators.SerializedAsMasterEvaluator.EvaluateUpdate(IItemData sourceItem, IItemData targetItem)
at Unicorn.Loader.SerializationLoader.DoLoadItem(IItemData serializedItemData, 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, IItemData[] roots)
at Unicorn.ControlPanel.SyncConsole.Process(IProgressStatus progress)
What I did is I simply updated project on my local machine it went fine, no errors.
When I pushed my changes to a dev server it failed to "Sync" items with this error.
I made a clean "Serialization" on dev, and turns out that there is only one difference in failing files:
This issue appears not only in Language item it appears in other items not created by me (Sitecore items).
From the de-compiler I can see that there are not a lot of places for NullRef,
Please let me know if you need more info.
Thanks.
Using Unicorn 3.0 b8.
Here's the <include>
that I added to the stock <predicate>
<include database="master" path="/sitecore/media library/SUGBG/Hero Images/_Default Hero" />
This is a single image item within the media library. I didn't do any further testing to see if this happens with any item anywhere or if it's unique to media. Here's the error showing up in the Unicorn console:
Unable to resolve root serialized item for predicate root path master:/sitecore/media library/SUGBG/Hero Images/_Default Hero. Either the path did not exist, or multiple items matched the path. It has been skipped.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.