We have moved to GitHub Issues
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, Func
2 getContentType, Action1 saveContentType, Action
1 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)
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!
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 :/
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.
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
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.
Also seen in 7.10.4 - Adding a doctype with name "Tekstside" and alias "textPage" gave the error. @cryothic's workaround worked though.
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.
Fixed with: https://github.com/umbraco/Umbraco-CMS/pull/2827
Backwards Compatible: True
Affected versions: 7.9.2, 7.10.2, 7.10.4
Due in version: 7.12.0