I have a helper method that works perfectly on local, however does not want to work on dev server. I used all sorts of logs to find out where the problem lies. It does get the current node and the homepage as well, however when it tries to use the
GetPropertyValue<Dictionary<string, string>> it comes back as null.
System.NullReferenceException: Object reference not set to an instance of an object. as I am trying to use this value later down the line.
var helper = new UmbracoHelper(UmbracoContext.Current); var homepage = helper.TypedContent(UmbracoContext.Current.PageId).AncestorOrSelf(1); var test = homepage.Children.First(x => x.DocumentTypeAlias == "test"); Dictionary<string, string> testDict = test.GetPropertyValue<Dictionary<string, string>>("testOptions");
It finds everything even test node, but testDict is null