I'm having a peculiar error using Umbraco.Core.ApplicationContext.Current.Services.MediaService.GetChildren(nodeid). It always returns null for any media node.
However if I use Umbraco.Core.ApplicationContext.Current.Services.MediaService.HasChildren(nodeid) for a node with child elements, it returns true.
I also tried Umbraco.Core.ApplicationContext.Current.Services.MediaService.GetDescendants(nodeid) but the result is null as well.
I had to revert to using some deprecated methods, such as umbraco.cms.businesslogic.media.Media(nodeid) to be able to load that node and its child elements.
Does anybody else get a similar error when using Umbraco.Core.ApplicationContext.Current.Services.MediaService.GetChildren?
Umbraco.Core.ApplicationContext.Current.Services.MediaService Error
Hello,
I'm having a peculiar error using Umbraco.Core.ApplicationContext.Current.Services.MediaService.GetChildren(nodeid). It always returns null for any media node.
However if I use Umbraco.Core.ApplicationContext.Current.Services.MediaService.HasChildren(nodeid) for a node with child elements, it returns true.
I also tried Umbraco.Core.ApplicationContext.Current.Services.MediaService.GetDescendants(nodeid) but the result is null as well.
I'm using umbraco 6.1.3 and following the documentation in this page: http://our.umbraco.org/documentation/Reference/Management-v6/Services/MediaService.
I had to revert to using some deprecated methods, such as umbraco.cms.businesslogic.media.Media(nodeid) to be able to load that node and its child elements.
Does anybody else get a similar error when using Umbraco.Core.ApplicationContext.Current.Services.MediaService.GetChildren?
I would like to use these new methods.
Thanks
is working on a reply...