Portal Engine
Version 3.x > Portal Engine > Replication Error View modes: 
User avatar
Member
Member
TC - 11/20/2008 4:35:03 AM
   
Replication Error
Hi,

I have followed the instructions in your article for setting up a replication publication (http://devnet.kentico.com/Knowledge-Base/API-and-Internals/Replication-configuration-for-Kentico-CMS.aspx) but I receive an error when trying to add a new Page (menu item) under the Root node.
I have not tried setting up the Subscription yet as I don't want to do this until I am sure the publication is working.
Can you recreate this error and do you know how to fix this?

This is the Exception Details:

Exception Details: System.Exception: [DataConnection.ExecuteQuery]: Query: INSERT INTO CMS_Document ( [DocumentName], [DocumentNamePath], [DocumentModifiedWhen], [DocumentModifiedByUserID], [DocumentForeignKeyValue], [DocumentCreatedByUserID], [DocumentCreatedWhen], [DocumentCheckedOutByUserID], [DocumentCheckedOutWhen], [DocumentCheckedOutVersionHistoryID], [DocumentPublishedVersionHistoryID], [DocumentWorkflowStepID], [DocumentPublishFrom], [DocumentPublishTo], [DocumentUrlPath], [DocumentCulture], [DocumentNodeID], [DocumentPageTitle], [DocumentPageKeyWords], [DocumentPageDescription], [DocumentShowInSiteMap], [DocumentMenuItemHideInNavigation], [DocumentMenuCaption], [DocumentMenuStyle], [DocumentMenuItemImage], [DocumentMenuItemLeftImage], [DocumentMenuItemRightImage], [DocumentPageTemplateID], [DocumentMenuJavascript], [DocumentMenuRedirectUrl], [DocumentUseNamePathForUrlPath], [DocumentStylesheetID], [DocumentContent], [DocumentMenuClass], [DocumentMenuStyleOver], [DocumentMenuClassOver], [DocumentMenuItemImageOver], [DocumentMenuItemLeftImageOver], [DocumentMenuItemRightImageOver], [DocumentMenuStyleHighlighted], [DocumentMenuClassHighlighted], [DocumentMenuItemImageHighlighted], [DocumentMenuItemLeftImageHighlighted], [DocumentMenuItemRightImageHighlighted], [DocumentMenuItemInactive], [DocumentCustomData] ) VALUES ( @DocumentName, @DocumentNamePath, @DocumentModifiedWhen, @DocumentModifiedByUserID, @DocumentForeignKeyValue, @DocumentCreatedByUserID, @DocumentCreatedWhen, @DocumentCheckedOutByUserID, @DocumentCheckedOutWhen, @DocumentCheckedOutVersionHistoryID, @DocumentPublishedVersionHistoryID, @DocumentWorkflowStepID, @DocumentPublishFrom, @DocumentPublishTo, @DocumentUrlPath, @DocumentCulture, @DocumentNodeID, @DocumentPageTitle, @DocumentPageKeyWords, @DocumentPageDescription, @DocumentShowInSiteMap, @DocumentMenuItemHideInNavigation, @DocumentMenuCaption, @DocumentMenuStyle, @DocumentMenuItemImage, @DocumentMenuItemLeftImage, @DocumentMenuItemRightImage, @DocumentPageTemplateID, @DocumentMenuJavascript, @DocumentMenuRedirectUrl, @DocumentUseNamePathForUrlPath, @DocumentStylesheetID, @DocumentContent, @DocumentMenuClass, @DocumentMenuStyleOver, @DocumentMenuClassOver, @DocumentMenuItemImageOver, @DocumentMenuItemLeftImageOver, @DocumentMenuItemRightImageOver, @DocumentMenuStyleHighlighted, @DocumentMenuClassHighlighted, @DocumentMenuItemImageHighlighted, @DocumentMenuItemLeftImageHighlighted, @DocumentMenuItemRightImageHighlighted, @DocumentMenuItemInactive, @DocumentCustomData); SELECT @@identity AS [DocumentID]: caused exception: The INSERT statement conflicted with the FOREIGN KEY constraint "FK__CMS_Docum__Docum__3A81B327". The conflict occurred in database "KenticoCMS", table "dbo.CMS_Tree", column 'NodeID'.
The statement has been terminated.

Source Error:

Line 166: {
Line 167: // Insert the document
Line 168: DocumentHelper.InsertDocument(node, rootNodeId, tree);
Line 169: //node.Insert(rootNodeId);
Line 170:

Source File: c:\Inetpub\wwwroot\KenticoCMS\CMSDesk\Content\NewPage.aspx.cs Line: 168

Stack Trace:

[Exception: [DataConnection.ExecuteQuery]: Query: INSERT INTO CMS_Document ( [DocumentName], [DocumentNamePath], [DocumentModifiedWhen], [DocumentModifiedByUserID], [DocumentForeignKeyValue], [DocumentCreatedByUserID], [DocumentCreatedWhen], [DocumentCheckedOutByUserID], [DocumentCheckedOutWhen], [DocumentCheckedOutVersionHistoryID], [DocumentPublishedVersionHistoryID], [DocumentWorkflowStepID], [DocumentPublishFrom], [DocumentPublishTo], [DocumentUrlPath], [DocumentCulture], [DocumentNodeID], [DocumentPageTitle], [DocumentPageKeyWords], [DocumentPageDescription], [DocumentShowInSiteMap], [DocumentMenuItemHideInNavigation], [DocumentMenuCaption], [DocumentMenuStyle], [DocumentMenuItemImage], [DocumentMenuItemLeftImage], [DocumentMenuItemRightImage], [DocumentPageTemplateID], [DocumentMenuJavascript], [DocumentMenuRedirectUrl], [DocumentUseNamePathForUrlPath], [DocumentStylesheetID], [DocumentContent], [DocumentMenuClass], [DocumentMenuStyleOver], [DocumentMenuClassOver], [DocumentMenuItemImageOver], [DocumentMenuItemLeftImageOver], [DocumentMenuItemRightImageOver], [DocumentMenuStyleHighlighted], [DocumentMenuClassHighlighted], [DocumentMenuItemImageHighlighted], [DocumentMenuItemLeftImageHighlighted], [DocumentMenuItemRightImageHighlighted], [DocumentMenuItemInactive], [DocumentCustomData] ) VALUES ( @DocumentName, @DocumentNamePath, @DocumentModifiedWhen, @DocumentModifiedByUserID, @DocumentForeignKeyValue, @DocumentCreatedByUserID, @DocumentCreatedWhen, @DocumentCheckedOutByUserID, @DocumentCheckedOutWhen, @DocumentCheckedOutVersionHistoryID, @DocumentPublishedVersionHistoryID, @DocumentWorkflowStepID, @DocumentPublishFrom, @DocumentPublishTo, @DocumentUrlPath, @DocumentCulture, @DocumentNodeID, @DocumentPageTitle, @DocumentPageKeyWords, @DocumentPageDescription, @DocumentShowInSiteMap, @DocumentMenuItemHideInNavigation, @DocumentMenuCaption, @DocumentMenuStyle, @DocumentMenuItemImage, @DocumentMenuItemLeftImage, @DocumentMenuItemRightImage, @DocumentPageTemplateID, @DocumentMenuJavascript, @DocumentMenuRedirectUrl, @DocumentUseNamePathForUrlPath, @DocumentStylesheetID, @DocumentContent, @DocumentMenuClass, @DocumentMenuStyleOver, @DocumentMenuClassOver, @DocumentMenuItemImageOver, @DocumentMenuItemLeftImageOver, @DocumentMenuItemRightImageOver, @DocumentMenuStyleHighlighted, @DocumentMenuClassHighlighted, @DocumentMenuItemImageHighlighted, @DocumentMenuItemLeftImageHighlighted, @DocumentMenuItemRightImageHighlighted, @DocumentMenuItemInactive, @DocumentCustomData); SELECT @@identity AS [DocumentID]: caused exception: The INSERT statement conflicted with the FOREIGN KEY constraint "FK__CMS_Docum__Docum__3A81B327". The conflict occurred in database "KenticoCMS", table "dbo.CMS_Tree", column 'NodeID'.
The statement has been terminated.]
CMS.TreeEngine.TreeNode.Insert(Int32 parentNodeId) +4960
CMS.WorkflowEngine.DocumentHelper.InsertDocument(TreeNode node, Int32 parentNodeId, TreeProvider tree) +66
CMSDesk_PortalEngine_NewPage.btnOk_Click(Object sender, EventArgs e) in c:\Inetpub\wwwroot\KenticoCMS\CMSDesk\Content\NewPage.aspx.cs:168
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +175
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1565

Regards
TC