U4-9552 - 7.6 MemberType cannot be saved

Created by Shannon Deminick 21 Feb 2017, 00:01:16 Updated by Emil Wangaa 21 Feb 2017, 08:10:18

Tags: Unscheduled

Creating or saving a MemberType results in a YSOD:

An error occured

The content type must be Umbraco.Core.Models.IContentType or Umbraco.Core.Models.IMediaType

EXCEPTION DETAILS

System.NotSupportedException: The content type must be Umbraco.Core.Models.IContentType or Umbraco.Core.Models.IMediaType STACKTRACE

at Umbraco.Core.Models.ContentTypeExtensions.Descendants(IContentTypeBase contentType, IContentTypeService contentTypeService) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\Models\ContentTypeExtensions.cs:line 34 at Umbraco.Web.Cache.ContentTypeCacheRefresher.FromContentType(IContentTypeBase contentType, Boolean isDeleted) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Web\Cache\ContentTypeCacheRefresher.cs:line 50 at Umbraco.Web.Cache.ContentTypeCacheRefresher.<>c__DisplayClass2_0.b__0(IContentTypeBase x) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Web\Cache\ContentTypeCacheRefresher.cs:line 82 at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Linq.Buffer1..ctor(IEnumerable1 source) at System.Linq.Enumerable.ToArray[TSource](IEnumerable1 source) at Umbraco.Web.Cache.ContentTypeCacheRefresher.SerializeToJsonPayload(Boolean isDeleted, IContentTypeBase[] contentTypes) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Web\Cache\ContentTypeCacheRefresher.cs:line 82 at Umbraco.Web.Cache.DistributedCacheExtensions.RefreshMemberTypeCache(DistributedCache dc, IMemberType memberType) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Web\Cache\DistributedCacheExtensions.cs:line 339 at Umbraco.Web.Cache.CacheRefresherEventHandler.<>c.<MemberTypeService_Saved>b__37_0(IMemberType x) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Web\Cache\CacheRefresherEventHandler.cs:line 615 at Umbraco.Core.EnumerableExtensions.ForEach[TItem](IEnumerable1 items, Action1 action) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\EnumerableExtensions.cs:line 92 at Umbraco.Web.Cache.CacheRefresherEventHandler.MemberTypeService_Saved(IMemberTypeService sender, SaveEventArgs1 e) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Web\Cache\CacheRefresherEventHandler.cs:line 615 at Umbraco.Core.Events.EventDefinition2.RaiseEvent() in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\Events\EventDefinition.cs:line 69 at Umbraco.Core.Events.ScopeEventDispatcher.ScopeExit(Boolean completed) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\Events\ScopeEventDispatcher.cs:line 122 at Umbraco.Core.Scoping.Scope.<>c__DisplayClass61_0.b__1() in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\Scoping\Scope.cs:line 409 at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\Scoping\Scope.cs:line 445 at Umbraco.Core.Scoping.Scope.TryFinally(Int32 index, Action[] actions) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\Scoping\Scope.cs:line 449 at Umbraco.Core.Scoping.Scope.TryFinally(Action[] actions) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\Scoping\Scope.cs:line 437 at Umbraco.Core.Scoping.Scope.RobustExit(Boolean completed, Boolean onException) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\Scoping\Scope.cs:line 396 at Umbraco.Core.Scoping.Scope.DisposeLastScope() in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\Scoping\Scope.cs:line 376 at Umbraco.Core.Scoping.Scope.Dispose() in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\Scoping\Scope.cs:line 339 at Umbraco.Core.Persistence.UnitOfWork.ScopeUnitOfWork.DisposeResources() in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\Persistence\UnitOfWork\ScopeUnitOfWork.cs:line 218 at Umbraco.Core.DisposableObject.Dispose(Boolean disposing) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\DisposableObject.cs:line 53 at Umbraco.Core.DisposableObject.Dispose() in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\DisposableObject.cs:line 31 at Umbraco.Core.Services.MemberTypeService.Save(IMemberType memberType, Int32 userId) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Core\Services\MemberTypeService.cs:line 106 at Umbraco.Web.Editors.MemberTypeController.b__8_1(IMemberType type) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Web\Editors\MemberTypeController.cs:line 137 at Umbraco.Web.Editors.ContentTypeControllerBase.PerformPostSave[TContentType,TContentTypeDisplay,TContentTypeSave,TPropertyType](TContentTypeSave contentTypeSave, Func2 getContentType, Action1 saveContentType, Action1 beforeCreateNew) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Web\Editors\ContentTypeControllerBase.cs:line 251 at Umbraco.Web.Editors.MemberTypeController.PostSave(MemberTypeSave contentTypeSave) in X:\Projects\Umbraco\Umbraco_7.6\src\Umbraco.Web\Editors\MemberTypeController.cs:line 134 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.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.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.Dispatcher.HttpControllerDispatcher.d__1.MoveNext()

Comments

Shannon Deminick 21 Feb 2017, 02:50:43

Fix is in rev: b4eb9f333e2da508346f4c6ad4eba9285ac6631c on the ContentTypeExtensions as part of http://issues.umbraco.org/issue/U4-9470


Emil Wangaa 21 Feb 2017, 07:12:55

Verified no YSOD when creating or saving a membertype after this fix.


Priority: Show-stopper

Type: Bug

State: Fixed

Assignee:

Difficulty: Normal

Category:

Backwards Compatible: True

Fix Submitted:

Affected versions: 7.6.0

Due in version: 7.6.0

Sprint: Sprint 53

Story Points:

Cycle: