Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Chris Perks 32 posts 114 karma points
    Dec 02, 2016 @ 17:06
    Chris Perks
    1

    Error viewing member accounts in backoffice

    My version: Umbraco version 7.3.4 assembly: 1.0.5820.25371

    Hi,

    When trying to view an individual member account in the back office, I get the below error.

    This happens for all member accounts, which previously have been viewable fine. I have tried creating new member accounts with no custom properties - and still get the same problem.

    I've tried on multiple browsers / clearing caches and so on. Any ideas how to get more meaning out of the error message?

    Thanks.

    enter image description here

    Received an error from the server
    Failed to retrieve data for member id 9b94e77c40c0405cbddbbd0066abfae6
    
    Mapping types: IMember -> MemberDisplay Umbraco.Core.Models.IMember -> Umbraco.Web.Models.ContentEditing.MemberDisplay Destination path: MemberDisplay Source value: Umbraco.Core.Models.Member
    Exception Details:
    AutoMapper.AutoMapperMappingException: Mapping types: IMember -> MemberDisplay Umbraco.Core.Models.IMember -> Umbraco.Web.Models.ContentEditing.MemberDisplay Destination path: MemberDisplay Source value: Umbraco.Core.Models.Member
    Stacktrace:
    
    at Umbraco.Web.Editors.MemberController.GetByKey(Guid key)
    
       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, IDictionary`2 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.<InvokeActionAsyncCore>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.<CallOnActionExecutedAsync>d__5.MoveNext()
    
    --- End of stack trace from previous location where exception was thrown ---
    
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>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.<ExecuteActionFilterAsyncCore>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.<CallOnActionExecutedAsync>d__5.MoveNext()
    
    --- End of stack trace from previous location where exception was thrown ---
    
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>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.<ExecuteActionFilterAsyncCore>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.<CallOnActionExecutedAsync>d__5.MoveNext()
    
    --- End of stack trace from previous location where exception was thrown ---
    
       at System.Web.Http.Filters.ActionFilterAttribute.<CallOnActionExecutedAsync>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.<ExecuteActionFilterAsyncCore>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.<ExecuteAsync>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.<ExecuteAuthorizationFilterAsyncCore>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.<ExecuteAuthorizationFilterAsyncCore>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.<SendAsync>d__1.MoveNext()
    
  • Chris Perks 32 posts 114 karma points
    Dec 06, 2016 @ 17:20
    Chris Perks
    100

    It seems Umbraco is stripping out some of the exception detail, but I dug in a little further and found the InnerException causing AutoMapper to crash:

    enter image description here

    • The parameter 'roleName' must not contain commas

    Learning points:

    • Member Group names shouldn't have commas. My offending one was Korea, Republic of
    • If you create Member Groups through the backoffice UI, validation rules correctly stop you using a comma in the name.
    • If you programmatically create the Member Group using MemberService.AddRole, no validation rules apply. Manually strip out the commas yourself or you'll get AutoMapper exceptions.
Please Sign in or register to post replies

Write your reply to:

Draft