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 ...
I created a user group with same alias as the parent node document type
I experimented by logging in user with temporary gmail account Google OAuth
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).
To be safe I renamed user group to something globally unique
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
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.
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
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.
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 ...
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.WhereSelectArrayIterator
2.MoveNext() at System.Collections.Generic.List
1..ctor(IEnumerable1 collection) at System.Linq.Enumerable.ToList[TSource](IEnumerable
1 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.ValueResolver
2.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](IEnumerable
1 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 116I 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.
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:
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.is working on a reply...