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 10092 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 4908 posts 12265 karma points MVP 5x 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

Please Sign in or register to post replies

Write your reply to:

Draft