Getting error Can't create child folders you doctypes might be flat
I am trying to import document types organised into folders, and getting this error Umbraco 7.9.0 Usync: 4.0.4
DocumentType structure

2018-03-14 14:32:16,505 [P3856/D25/T602] WARN Jumoo.uSync.Core.Serializers.ContentTypeSerializer - Can't create child folders Općina you doctypes might be flat 2018-03-14 14:32:16,527 [P3856/D25/T602] ERROR Jumoo.uSync.BackOffice.Controllers.uSyncApiController - Unhandled controller exception occurred System.NullReferenceException: Object reference not set to an instance of an object. at Jumoo.uSync.Core.Serializers.ContentTypeSerializer.GetContentFolders(XElement info, IContentType item) at Jumoo.uSync.Core.Serializers.ContentTypeSerializer.DeserializeCore(XElement node) at Jumoo.uSync.Core.Serializers.SyncBaseSerializer
1.DeSerialize(XElement node, Boolean forceUpdate) at Jumoo.uSync.BackOffice.Handlers.ContentTypeHandler.Import(String filePath, Boolean force) at Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportFolder(String folder, Boolean force, Dictionary2 updates) at Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportFolder(String folder, Boolean force, Dictionary2 updates) at Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportFolder(String folder, Boolean force, Dictionary2 updates) at Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportFolder(String folder, Boolean force, Dictionary2 updates) at Jumoo.uSync.BackOffice.Handlers.uSyncBaseHandler1.ImportAll(String folder, Boolean force) at Jumoo.uSync.BackOffice.uSyncBackOfficeContext.Import(IEnumerable1 syncHandlers, String folder, Boolean checkConfig, Boolean force, String groupName) at Jumoo.uSync.BackOffice.uSyncBackOfficeContext.Import(String groupName, String folder, Boolean force) at Jumoo.uSync.BackOffice.uSyncBackOfficeContext.ImportAll(String folder, Boolean force) at Jumoo.uSync.BackOffice.Controllers.uSyncApiController.Import(Boolean force) at lambda_method(Closure , Object , Object[] ) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ActionExecutor.<>c__DisplayClass10.<GetExecutor>b__9(Object instance, Object[] methodParameters) at System.Web.Http.Controllers.ReflectedHttpActionDescriptor.ExecuteAsync(HttpControllerContext controllerContext, IDictionary2 arguments, CancellationToken cancellationToken) --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker.<InvokeActionAsyncCore>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.<ExecuteActionFilterAsyncCore>d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ActionFilterResult.<ExecuteAsync>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.AuthorizationFilterAttribute.<ExecuteAuthorizationFilterAsyncCore>d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ExceptionFilterResult.<ExecuteAsync>d__0.MoveNext()
yeah that warning isn't so much a warning as an error it turns out.
the failure appears to be steaming from uSync not being able to create the folder - now the code checks for the existence of the folder before then calling the Umbraco Api to create it:
private EntityContainer TryCreateContainer(string name, EntityContainer parent)
{
LogHelper.Debug<ContentTypeSerializer>("TryCreate: {0} under {1}", () => name, () => parent.Name);
var children = _entityService.GetChildren(parent.Id, UmbracoObjectTypes.DocumentTypeContainer).ToArray();
if (children.Any(x => x.Name.InvariantEquals(name)))
{
var folderId = children.Single(x => x.Name.InvariantEquals(name)).Id;
return _contentTypeService.GetContentTypeContainer(folderId);
}
// else - create
var attempt = _contentTypeService.CreateContentTypeContainer(parent.Id, name);
if (attempt == true)
return _contentTypeService.GetContentTypeContainer(attempt.Result.Entity.Id);
LogHelper.Warn<ContentTypeSerializer>("Can't create child folders {0} you doctypes might be flat", () => name);
return null;
}
the only way to get to that log line if for the create to fail for some reason - :(
things i can think might be an issue -
- Unicode characters ? I've never seen it as an issue before but maybe the unicode charecters in the folder name are throwing it.
- No parent : you shouldn't even get here if the parent folder doesn't exist, but it might not
- Some other events: something else listening in on events and stopping us from creating things
if you could try:
- renaming the folder to something without the ć in it ?
- turning on debug logging (see below) to see what the debug line here returns
- checking nothing else is installed that stops the creation of doctypes or folders.