Copied to clipboard

Flag this post as spam?

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


  • Lennart Stoop 304 posts 842 karma points
    Jan 20, 2012 @ 09:52
    Lennart Stoop
    1

    Null reference when saving documents through API

    Hey Stefan,

    When I save documents through Document.Save() a null reference is thrown in the Document_AfterSave event handler. The handler makes a call to BasePage.Current, which is not set outside of the back office context.

    So here's a small fix:

    if (BasePage.Current != null)
        BasePage.Current.ClientTools.ChangeContentFrameUrl(string.Concat("editContent.aspx?id=", doc.Id));

    Otherwise very useful package, thanks for contributing!

    Grtz

    L

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies