Copied to clipboard

Flag this post as spam?

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


  • Jakob Lithner 61 posts 264 karma points
    Sep 03, 2018 @ 18:38
    Jakob Lithner
    0

    Strange user profile error

    I had a site ready to be published when suddenly an awkward error turn up ;-(

    When expanding content tree I select a node with several subnodes. Then instead of displaying the normal list view I get a backend crash report. See full output below.

    I have been experimenting with user group settings and might have done some stupid things by mistake ...

    1. I created a user group with same alias as the parent node document type
    2. I experimented by logging in user with temporary gmail account Google OAuth
    3. I tried to remove the temporary user in backend. Since there was no option to delete i got desperate and just deleted the user from database (including records in related tables).
    4. To be safe I renamed user group to something globally unique

      An error occured

      Mapping types: Content -> UserProfile Umbraco.Core.Models.Content -> Umbraco.Web.Models.ContentEditing.UserProfile

      Destination path: ContentItemBasic`2.Updater.Updater

      Source value: Umbraco.Core.Models.Content

      Exception Details

      AutoMapper.AutoMapperMappingException:

      Mapping types: Content -> UserProfile Umbraco.Core.Models.Content -> Umbraco.Web.Models.ContentEditing.UserProfile

      Destination path: ContentItemBasic`2.Updater.Updater

      Source value: Umbraco.Core.Models.Content

      Stacktrace

      at Umbraco.Web.Editors.ContentController.<>cDisplayClass18_0.0(IContent content) at System.Linq.Enumerable.WhereSelectArrayIterator2.MoveNext() at System.Collections.Generic.List1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable1 source) at Umbraco.Web.WebApi.Filters.FilterAllowedOutgoingMediaAttribute.OnActionExecuted(HttpActionExecutedContext actionExecutedContext) at System.Web.Http.Filters.ActionFilterAttribute.OnActionExecutedAsync(HttpActionExecutedContext actionExecutedContext, 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.Filters.ActionFilterAttribute.

      Inner Exception

      System.NullReferenceException: Object reference not set to an instance of an object.

      at Umbraco.Core.Services.UserService.GetProfileById(Int32 id) at Umbraco.Core.Models.ContentExtensions.GetWriterProfile(IContent content) at Umbraco.Web.Models.Mapping.CreatorResolver.ResolveCore(IContent source) at AutoMapper.ValueResolver2.Resolve(ResolutionResult source) in c:\dev\AutoMapper\src\AutoMapper\ValueResolver.cs:line 12 at AutoMapper.PropertyMap.<ResolveValue>b__6(ResolutionResult current, IValueResolver resolver) in c:\dev\AutoMapper\src\AutoMapper\PropertyMap.cs:line 127 at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable1 source, TAccumulate seed, Func`3 func) at AutoMapper.PropertyMap.ResolveValue(ResolutionContext context) in c:\dev\AutoMapper\src\AutoMapper\PropertyMap.cs:line 127 at AutoMapper.Mappers.TypeMapObjectMapperRegistry.PropertyMapMappingStrategy.MapPropertyValue(ResolutionContext context, IMappingEngineRunner mapper, Object mappedObject, PropertyMap propertyMap) in c:\dev\AutoMapper\src\AutoMapper\Mappers\TypeMapObjectMapperRegistry.cs:line 116

  • Jakob Lithner 61 posts 264 karma points
    Sep 06, 2018 @ 14:19
    Jakob Lithner
    100

    I did not really solve it, but came up with a workaround. It was possible to create a new parent with same type. In code I was then able to Move content nodes from old parent node to new.

  • Adam 8 posts 85 karma points
    Jan 02, 2019 @ 14:15
    Adam
    4

    I had similar issue but in my case it was when I tried to open specific node by clicking on it. In my case it was caused by missing user in database with id 80. Below sql script fixed the issue for me:

      update [cmsDocument]
      set documentUser = 0
      where documentUser = 80
    
      update [umbracoLog]
      set userId = 0
      where userId = 80
    
      update umbracoNode 
      set nodeUser = 0 
      where nodeUser = 80
    
  • Chris Van Oort 110 posts 370 karma points
    Oct 23, 2019 @ 17:46
    Chris Van Oort
    1

    This just saved me -- thank you! On Umbraco 7.15.3 last week I deleted some old backoffice users and then ran into this problem today.

    If anyone else reads this -- '0' is your built-in Umbraco admin account. I slightly modified those update set queries with WHERE documentUser NOT IN(0, 2, 7, 8) (change documentUser to userId/nodeUser as applicable) so that it would fix all of the old entries from deleting those user accounts. Keeping it simple in the future, disabling users seems to be the safer bet.

Please Sign in or register to post replies

Write your reply to:

Draft