ClientTools.SyncTree throws "object reference not set to an instance....." help
Hey there :)
Im building a custom datatype for a customer at the moment and im in need to refresh the media tree structure. Ive read that i should use the "synctree" in the clienttools.
In my custom datatype project i make some ajax requests to /base service. and inside this function im executing a
BasePage.Current.ClientTools.SyncTree(selected.Path, true).ShowSpeechBubble(BasePage.speechBubbleIcon.success, "Saved", "Changes has been saved");
But its just giving me "Object reference not set to an instance of an object."
I too encountered this issue and came accross this post when trying to investigate the issue and as there were no replies I though I would reply with what I did to fix this.
All I had to do to fix this, was to inherit my page class from umbraco.BasePages.UmbracoEnsuredPage. Example provided below:
public partial class MyUmbracoPage : umbraco.BasePages.UmbracoEnsuredPage
ClientTools.SyncTree throws "object reference not set to an instance....." help
Hey there :)
Im building a custom datatype for a customer at the moment and im in need to refresh the media tree structure. Ive read that i should use the "synctree" in the clienttools.
In my custom datatype project i make some ajax requests to /base service. and inside this function im executing a
But its just giving me "Object reference not set to an instance of an object."
Anyone who can help ?
Hello,
I see this was posted a while back.
I too encountered this issue and came accross this post when trying to investigate the issue and as there were no replies I though I would reply with what I did to fix this.
All I had to do to fix this, was to inherit my page class from umbraco.BasePages.UmbracoEnsuredPage. Example provided below:
public partial class MyUmbracoPage : umbraco.BasePages.UmbracoEnsuredPage
Hope this helps.
Thanks,
Chris
Awesome thx :)
I will throw you a green check marker and remember it for next time.
I'm trying to do this in an event. Has anybody had any joy with it that way?
The events inherit from ApplicationBase so can't use UmbracoEnsurePage
is working on a reply...