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.
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...
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
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
is working on a reply...