When I try to copy a page with in the content tree it was showing an alert exception stack trace as mentioned below but pages are being copied successfully. Please check this asap.
Failed to copy the page : Message: Object reference not set to an instance of an object. Exception type: System.NullReferenceException Stack Trace: at CMS.Helpers.ScriptHelper.RegisterStartupScript(Page page, Type type, String key, String script, Boolean addScriptTags) at S2S.SystemModule.LinkedDocumentManager.DocumentInsertAfter(Object sender, DocumentEventArgs e) at CMS.Base.AbstractHandler.CallEventHandler[TArgs](EventHandler1 h, TArgs e) at CMS.Base.AbstractHandler.Raise[TArgs](String partName, List1 list, TArgs e, Boolean important) at CMS.Base.AdvancedHandler2.RaiseAfter(TArgs e) at CMS.Base.AdvancedHandler2.RaiseAfter(TArgs e) at CMS.Base.AdvancedHandler`2.Finish() at CMS.DocumentEngine.TreeNode.InsertInternal(TreeNode parent) at CMS.DocumentEngine.TreeNode.Insert(TreeNode parent, Boolean useDocumentHelper) at CMS.DocumentEngine.TreeProvider.CopyNode(CopyDocumentSettings settings) at CMS.DocumentEngine.DocumentHelper.CopyDocument(CopyDocumentSettings settings) at CMS.UIControls.ContentActionsControl.CopyNode(TreeNode node, TreeNode targetNode, Boolean childNodes, TreeProvider tree, Boolean copyPermissions, String newDocumentName) at CMSModules_Content_Controls_Dialogs_Properties_CopyMoveLinkProperties.Copy(Object parameter)
1 h, TArgs e) at CMS.Base.AbstractHandler.Raise[TArgs](String partName, List
2.RaiseAfter(TArgs e) at CMS.Base.AdvancedHandler
Hi Vinod,
Are you possibly using custom document events or advanced workflow?
Hope this helps, Jeroen
Have you recently done any upgrades? Are you using the portal engine or aspx templates?
Hi Jeroen,
Thanks for your help.
100% it was our code which is causing the issue. We have written a handler for Documents.Insert.After which triggers the exception after the page copy(insert after)
Please, sign in to be able to submit a new answer.