Copied to clipboard

Flag this post as spam?

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


  • pcorreia 5 posts 25 karma points
    Oct 21, 2013 @ 19:02
    pcorreia
    0

    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

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies