Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Bjarke Skjølstrup 3 posts 23 karma points
    Nov 20, 2012 @ 12:23
    Bjarke Skjølstrup
    0

    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

  • Tom Fulton 2030 posts 4998 karma points c-trib
    Nov 24, 2012 @ 21:15
    Tom Fulton
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft