Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
I have this situation on a couple of sites I upgraded from 7.1.x up to 7.12.4 and yesterday to 7.13.1.....
The immediate children of the Media section cannot be found OR if there are no immediate items then the children of the first Media folder. This also shows up in the Media Picker flyout panel. All give the same red error bar saying "Failed to retrieve children for media item -1". I thought maybe that it was because there may not be a Media Start Node set for my user group, but there was. However, when I removed it to reapply it, Media couldn't be listed. So again, children of the Media root can't be found. The Trace log error is like so:
2019-01-16 14:20:14,959 [P11664/D2/T72] ERROR Umbraco.Web.Editors.MediaController - Unhandled controller exception occurred
Media -> UserProfile
Umbraco.Core.Models.Media -> Umbraco.Web.Models.ContentEditing.UserProfile
Umbraco.Core.Models.Media ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Umbraco.Core.Services.UserService.GetProfileById(Int32 id)
at Umbraco.Web.Models.Mapping.OwnerResolver`1.ResolveCore(TPersisted source)
at AutoMapper.ValueResolver`2.Resolve(ResolutionResult source)
at System.Linq.Enumerable.Aggregate[TSource,TAccumulate](IEnumerable`1 source, TAccumulate seed, Func`3 func)
at AutoMapper.Mappers.TypeMapObjectMapperRegistry.PropertyMapMappingStrategy.MapPropertyValue(ResolutionContext context, IMappingEngineRunner mapper, Object mappedObject, PropertyMap propertyMap)
--- End of inner exception stack trace ---
I suspect that somehow a node has been removed in the database during the upgrade but I haven't a clue where or what. Could someone help me fault find this please?
If you've done a large upgrade all the way from 7.1, check the user permission and that they have the root node (or any node at all for that matter) set as a start node. I've seen it where migrated users (happens around v7.7 I think ) don't end up with any root nodes set in either Content or Media.
That appears to be what's happened BUT, I can't set the root node for Media
in the Administrator group as Media doesn't seem to exist. Would I be right in my suspicion that only "THE" administrator can reset them? Although I'm "AN" administrator, it may be that I can't see everything. I might try breaking in with the AdminReset package in that case. What do you think?
Broke in as "THE" administrator. Removed and reset the Media start node for the Administrator Group, THE administrator and my own administrator account. Logged out and in again as me, same problem, Media Picker errors with "Failed to retrieve children for media item -1" again. It's a complete conundrum at the moment. The error trace above does allude to this being the problem though. Question is, how to fix it?
When you log in as "The" administator account, find your user account and remove all the user groups from it.
Then Add your account back into which ever is the main usergroup it needs to have, ensuring that that user group has the root nodes for Media set as it's start node.
Once you've done that, see if you can set the root node for media on the user account itself.
Once all set, log out as "The" administrator and log back in as your account. You might need to do a hard refresh of the back office but that is what normally fixes it for me.
Did what you said, but it didn't work:( I tried to save my account with all groups removed but it's not possible so just reapplied Administrators to my account. Did a hard reset (touched web.config) and a hard reload, but no joy :(
Although when you initially open a Media Picker and get the error, you can still get results using the search. Also if you set a Media Picker itself with a start node other than "Media", it displays that folder's media perfectly. It's just the Media root that's the issue.
Hi Nick and Craig
Did you solve the issue? We have the same problem after upgrading the site.
@Alex @Nik, what did you upgrade from and then to versions?
We had issues when we upgraded from 7.7 to 7.12 then to 7.13. It seemed a port of the groups were auto generated and got a little messed up.
I would actually try making a new Admin Group names something else, and put your users in that Group. If you need to, make the Group have the access to the Root media folder.
We had the impression the root media folder's ID got changed somehow. Either that or everything seems to want to look for an ID of -1 for the root media folder.
We still haven't fixed it. Content editors are just working around it by never asking for the root media folder in media pickers.
I had a similar issue a while ago, but with content instead of media.
I noticed the the nodeUser in the dbo.umbracoNode table was set to -1 for all of my affected items.
My "quick-fix" was simply to replace this value with the id of a valid user (in my case, the default 0).
Interestingly, in the new V8, the default appears to be-1, so perhaps that's an indicator that there was an issue there that they've tried to prevent.
I'm not sure if this will solve your issue, but hopefully it helps!
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted