I have a problem when using this, otherwise fantastic tool. When i try to create a new Document via razor (C#) i get the following error:
Error Loading Razor Script (file: New Member) Object reference not set to an instance of an object. at TheOutfield.UmbExt.DocumentSorter.ApplicationBase.Document_Sort(Document doc, Object e) in e:\Development\_Public Projects\Document Sorter\ApplicationBase.cs:line 116 at umbraco.cms.businesslogic.web.Document.SaveEventHandler.Invoke(Document sender, SaveEventArgs e)
The code has worked great until i installed Document Sorter, so the call to Document.MakeNew() should be correct.
Try setting disableTreeRefresh="true" in your documentSorter.config file. My guess is it's trying to refresh the tree after sorting the documents, but it doesn't exist since you're calling from code. Should probably add a check before refreshing if this is the case.
Crashes when using Document.MakeNew()
Hey fellow Umbraco users.
I have a problem when using this, otherwise fantastic tool. When i try to create a new Document via razor (C#) i get the following error:
Error Loading Razor Script (file: New Member) Object reference not set to an instance of an object. at TheOutfield.UmbExt.DocumentSorter.ApplicationBase.Document_Sort(Document doc, Object e) in e:\Development\_Public Projects\Document Sorter\ApplicationBase.cs:line 116
at umbraco.cms.businesslogic.web.Document.SaveEventHandler.Invoke(Document sender, SaveEventArgs e)
The code has worked great until i installed Document Sorter, so the call to Document.MakeNew() should be correct.
Best regards
Bjarke
Hi Bjarke,
Try setting disableTreeRefresh="true" in your documentSorter.config file. My guess is it's trying to refresh the tree after sorting the documents, but it doesn't exist since you're calling from code. Should probably add a check before refreshing if this is the case.
-Tom
is working on a reply...