U4-11059 - Composition is neither IContentType nor IMediaType nor IMemberType?

Created by Ugur Celenk 05 Mar 2018, 09:31:33 Updated by Sebastiaan Janssen 01 Aug 2018, 06:11:42

Relates to: U4-7953

When I want to create a new document type, it gives the following error.

System.Exception: Composition is neither IContentType nor IMediaType nor IMemberType? at Umbraco.Core.Services.ContentTypeService.ValidateLocked(IContentTypeComposition compositionContentType) at Umbraco.Core.Services.ContentTypeService.ValidateComposition(IContentTypeComposition compo) at Umbraco.Web.Editors.ContentTypeControllerBase.CreateCompositionValidationExceptionIfInvalid[TContentTypeSave,TPropertyType,TContentTypeDisplay](TContentTypeSave contentTypeSave, IContentTypeComposition composition) at Umbraco.Web.Editors.ContentTypeControllerBase.PerformPostSave[TContentType,TContentTypeDisplay,TContentTypeSave,TPropertyType](TContentTypeSave contentTypeSave, Func2 getContentType, Action1 saveContentType, Action1 beforeCreateNew) at Umbraco.Web.Editors.ContentTypeController.PostSave(DocumentTypeSave contentTypeSave) 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.ActionExecutor.Execute(Object instance, Object[] arguments) 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.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ApiControllerActionInvoker.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Web.Http.Filters.ActionFilterAttribute.d__5.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.ActionFilterAttribute.d__0.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ActionFilterResult.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.AuthorizationFilterAttribute.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.AuthorizationFilterAttribute.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.AuthorizationFilterAttribute.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Filters.AuthorizationFilterAttribute.d__2.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Web.Http.Controllers.ExceptionFilterResult.d__0.MoveNext()

1 Attachments

Comments

Sebastiaan Janssen 15 Mar 2018, 13:45:35

Hey @ugurcelenk - unfortunatately we can't reproduce this error on a clean 7.9.2 install. If you have more steps to reproduce this on a clean install then please let us know!


cryothic 16 Mar 2018, 09:31:52

I just got the same error. But also, not on a clean install of 7.9.2. I've installed some of our own packages.

But what I did was create a new doctype, entered a name and an alias "dtVacancyOverview". Then saved and the error came up. I created another doctype with an alias "test", and it saved without a problem.

So, I created the first doctype again (since it didn't save obviously), alias: "dtVacancyOverview", and there was the error again. I then '''changed''' the alias to "test" and it saved succesfully. After that I changed it back to "dtVacancyOverview", and it saved also.

It's weird, but at least I can make new doctypes this way :/


Danny Drogt 22 Mar 2018, 14:55:13

I also got this error on an existing enviroment after updating to 7.9.2. Will try to reproduce steps and pinpoint what is happening.


Daniel Bowden 23 Mar 2018, 10:43:07

I just got this error today too on a new install of 7.9.2 I tried creating a new Doctype. I called it Home but changed the alias to HomePage. When you change the name and the alias to the same text it works... So HomePage -> HomePage works, Home -> HomePage didn't


Frank Schjelderup 29 May 2018, 06:21:14

I can confirm that this error occurs when creating a doctype where the name and alias do not match. When changing the alias to match the name it saves OK. When I after first save, change alias away from name again, it saves OK. Version 7.10.2.


Søren Kottal 19 Jun 2018, 07:51:31

Also seen in 7.10.4 - Adding a doctype with name "Tekstside" and alias "textPage" gave the error. @cryothic's workaround worked though.


Sebastiaan Janssen 31 Jul 2018, 19:51:13

This seems to have been caused by the fix for U4-7953.

You'd think it would be easy to just pass in the alias and ToTitleCase it, but the alias is not what we expect the template filename to be, we would expect the template file to have the same name as the document type name.


Sebastiaan Janssen 01 Aug 2018, 06:11:42

Fixed with: https://github.com/umbraco/Umbraco-CMS/pull/2827


Priority: Normal

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.9.2, 7.10.2, 7.10.4

Due in version: 7.12.0

Sprint:

Story Points:

Cycle: