Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10059 karma points MVP 2x admin c-trib
    Dec 11, 2012 @ 17:35
    Ismail Mayat
    0

    library.GetItem issue

    Hello,

    Using umbraco 4.7.1 and I have a page template that writes out some json the json is written using a macro the macro calls a helper method that makes use of library.GetItem. This all works fine. I am now trying to call the same code using Examine GatheringNodeData event however the library.GetItem call fails with null reference exception error.

    It seems as though when calling library.GetItem some context is not present? Either httpcontext or umbracoContext?  Anyone any ideas.

    Regards

    Ismail

  • Jeroen Breuer 4861 posts 12138 karma points MVP 3x admin c-trib
    Dec 11, 2012 @ 17:43
    Jeroen Breuer
    0

    I think that the GatheringNodeData event runs in a different thread that doesn't have the UmbracoContext. Don't think there is a good solution for that...

    Jeroen

  • 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