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

Item creation fails for Item with name starting with predicate #19

Closed
dharnitski opened this issue Oct 1, 2016 · 2 comments
Closed

Comments

@dharnitski
Copy link
Contributor

dharnitski commented Oct 1, 2016

I have configuration as follows:

    <configuration name="Default Configuration">
          <predicate type="Unicorn.Predicates.SerializationPresetPredicate, Unicorn" singleInstance="true">
               <include name="Templates" database="master" path="/sitecore/templates/Algolia"/>
          </predicate>
    </configuration>

and with it I am getting an exception when create an item /sitecore/templates/AlgoliaTest.

Items with names not starting with Algolia works fine.

No trees contained the global path /sitecore/templates/AlgoliaTest

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.InvalidOperationException: No trees contained the global path /sitecore/templates/Algolia1

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:

[InvalidOperationException: No trees contained the global path /sitecore/templates/AlgoliaTest]
Rainbow.Storage.SerializationFileSystemDataStore.Save(IItemData item) +286
Unicorn.Data.DataProvider.UnicornDataProvider.SerializeItemIfIncluded(IItemData item, String triggerReason) +101
Unicorn.Data.DataProvider.UnicornDataProvider.AddVersion(ItemDefinition itemDefinition, VersionUri baseVersion, CallContext context) +812
Unicorn.Data.DataProvider.UnicornSqlServerDataProvider.AddVersion(ItemDefinition itemDefinition, VersionUri baseVersion, CallContext context) +172
Sitecore.Data.DataProviders.DataProvider.AddVersion(ItemDefinition item, VersionUri baseVersion, CallContext context, DataProviderCollection providers) +128
Sitecore.Data.DataSource.AddVersion(ID itemID, VersionUri baseVersion) +82
Sitecore.Nexus.Data.DataCommands.AddVersionCommand.Execute(Item item) +211
Sitecore.Data.Engines.EngineCommand2.Execute() +96 Sitecore.Data.Engines.DataEngine.AddVersion(Item item) +316 Sitecore.Data.Managers.ItemProvider.AddVersion(Item item, SecurityCheck securityCheck) +265 Sitecore.Data.Managers.DefaultItemManager.ExecuteAndReturnResult(String pipelineName, String pipelineDomain, Func1 pipelineArgsCreator, Func1 fallbackResult) +165 Sitecore.Data.Managers.DefaultItemManager.AddVersion(Item item, SecurityCheck securityCheck) +239 Sitecore.Nexus.Data.DataCommands.AddFromTemplateCommand.�(String �, Item �, ID �, ID �) +66 Sitecore.Data.Engines.DataCommands.AddFromTemplateCommand.DoExecute() +116 Sitecore.Buckets.Commands.AddFromTemplateCommand.DoExecute() +1302 Sitecore.Data.Engines.EngineCommand2.Execute() +96
Sitecore.Data.Managers.ItemProvider.AddFromTemplate(String itemName, ID templateId, Item destination, ID newId) +370
Sitecore.Data.Managers.<>c__DisplayClass3.b__2() +51
Sitecore.Data.Managers.DefaultItemManager.ExecuteAndReturnResult(String pipelineName, String pipelineDomain, Func1 pipelineArgsCreator, Func1 fallbackResult) +165
Sitecore.Data.Managers.ItemManager.AddFromTemplate(String itemName, ID templateId, Item destination, ID newItemId) +151
Sitecore.Data.Items.Item.Add(String name, TemplateID templateID, ID newItemID) +93
Sitecore.Data.Items.Item.Add(String name, TemplateID templateID) +154
Sitecore.Workflows.WorkflowContext.AddItem(String name, TemplateItem template, Item parent) +84
Sitecore.Shell.Framework.Commands.AddMaster.Add(ClientPipelineArgs args) +869

[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) +128
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) +146
Sitecore.Reflection.ReflectionUtil.InvokeMethod(MethodInfo method, Object[] parameters, Object obj) +89
Sitecore.Nexus.Pipelines.NexusPipelineApi.Resume(PipelineArgs args, Pipeline pipeline) +313
Sitecore.Web.UI.Sheer.ClientPage.ResumePipeline() +224
Sitecore.Web.UI.Sheer.ClientPage.OnPreRender(EventArgs e) +823
Sitecore.Shell.Applications.ContentManager.ContentEditorPage.OnPreRender(EventArgs e) +24
System.Web.UI.Control.PreRenderRecursiveInternal() +200
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +7738

@kamsar
Copy link
Collaborator

kamsar commented Oct 4, 2016

This looks very similar to SitecoreUnicorn/Unicorn#166, and like it I cannot reproduce on the Unicorn 3.3 RC series. Are you using an older version? I think this issue may have been fixed in the latest codebase.

@kamsar
Copy link
Collaborator

kamsar commented Oct 27, 2016

Closing assumed fixed in 3.3.1

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

No branches or pull requests

2 participants