Failed to copy the page

Vinod Vutla asked on July 27, 2016 09:30

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)

Correct Answer

Jeroen Fürst answered on August 19, 2016 11:34

Hi Vinod,

Are you possibly using custom document events or advanced workflow?

Hope this helps, Jeroen

1 votesVote for this answer Unmark Correct answer

Recent Answers


Laura Frese answered on July 27, 2016 17:23

Have you recently done any upgrades? Are you using the portal engine or aspx templates?

1 votesVote for this answer Mark as a Correct answer

Vinod Vutla answered on April 30, 2018 06:34

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)

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.