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!
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
is working on a reply...