Kentico 6 imports website

harshal bundelkhandi asked on July 8, 2014 04:17

Hello Support,

When importing kentico version 6 website getting following error

ERROR: Error importing document '/BottomLinks/Site-map' Message: [DataConnection.ExecuteQuery]: Query: INSERT INTO CMS_Tree ([NodeAliasPath], [NodeName], [NodeAlias], [NodeClassID], [NodeParentID], [NodeLevel], [NodeACLID], [NodeSiteID], [NodeGUID], [NodeOrder], [IsSecuredNode], [NodeCacheMinutes], [NodeSKUID], [NodeDocType], [NodeHeadTags], [NodeBodyElementAttributes], [NodeInheritPageLevels], [NodeChildNodesCount], [RequiresSSL], [NodeLinkedNodeID], [NodeOwner], [NodeCustomData], [NodeGroupID], [NodeLinkedNodeSiteID] ) VALUES ( @NodeAliasPath, @NodeName, @NodeAlias, @NodeClassID, @NodeParentID, @NodeLevel, @NodeACLID, @NodeSiteID, @NodeGUID, @NodeOrder, @IsSecuredNode, @NodeCacheMinutes, @NodeSKUID, @NodeDocType, @NodeHeadTags, @NodeBodyElementAttributes, @NodeInheritPageLevels, @NodeChildNodesCount, @RequiresSSL, @NodeLinkedNodeID, @NodeOwner, @NodeCustomData, @NodeGroupID, @NodeLinkedNodeSiteID); SELECT SCOPE_IDENTITY() AS [NodeID]: caused exception: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_CMS_Tree_NodeLinkedNodeSiteID_CMS_Site". The conflict occurred in database "KenticoCMSTHNEW", table "dbo.CMS_Site", column 'SiteID'. The statement has been terminated. Stack Trace: at CMS.DataProviderSQL.DataConnection.ExecuteScalar(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) at CMS.DataEngine.GeneralConnection.ExecuteScalar(QueryParameters query) at CMS.DataEngine.GeneralConnection.ExecuteScalar(String queryName, QueryDataParameters parameters, String where, String orderBy, Int32 topN, String columns) at CMS.DataEngine.GeneralConnection.ExecuteScalar(String queryName, QueryDataParameters parameters) at CMS.DataEngine.SimpleDataClass.Insert(Boolean getId) at CMS.DataEngine.SimpleDataClass.Insert() at CMS.TreeEngine.TreeNode.Insert(TreeNode parent) at CMS.WorkflowEngine.ContentDocument.Insert(TreeNode parent, Boolean useDocumentHelper) at CMS.TreeEngine.TreeNode.Insert(Int32 parentNodeId, Boolean useDocumentHelper) at CMS.CMSImportExport.ImportProvider.ImportDocuments(SiteImportSettings settings, TranslationHelper th, List1& importedDocumentIDs, TreeProvider tree) at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at CMS.DataProviderSQL.DataConnection.ExecuteScalar(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)

Recent Answers


Bill Tran answered on July 8, 2014 13:10

It shows you have a foreign key violation.

By the naming convention, "FK_CMS_Tree_NodeLinkedNodeSiteID_CMS_Site"

the NodeLinkedNodeSiteId has an invalid value that does not match any SiteId in CMS_Site. Make sure the NodeLinedNodeSiteId has a value that can be matched up against the SiteId column in CMS_Site

0 votesVote for this answer Mark as a Correct answer

harshal bundelkhandi answered on July 12, 2014 05:30

Thanks For reply. I am importing website in blank Site.also How can i import version 6.0.43 website on that. please Suggest on this.

"ERROR:@@Error importing document '/BottomLinks/Site-map' Message: [DataConnection.HandleError]: Query: INSERT INTO CMS_Tree ([NodeAliasPath], [NodeName], [NodeAlias], [NodeClassID], [NodeParentID], [NodeLevel], [NodeACLID], [NodeSiteID], [NodeGUID], [NodeOrder], [IsSecuredNode], [NodeCacheMinutes], [NodeSKUID], [NodeDocType], [NodeHeadTags], [NodeBodyElementAttributes], [NodeInheritPageLevels], [NodeChildNodesCount], [RequiresSSL], [NodeLinkedNodeID], [NodeOwner], [NodeCustomData], [NodeGroupID], [NodeLinkedNodeSiteID] ) VALUES ( @NodeAliasPath, @NodeName, @NodeAlias, @NodeClassID, @NodeParentID, @NodeLevel, @NodeACLID, @NodeSiteID, @NodeGUID, @NodeOrder, @IsSecuredNode, @NodeCacheMinutes, @NodeSKUID, @NodeDocType, @NodeHeadTags, @NodeBodyElementAttributes, @NodeInheritPageLevels, @NodeChildNodesCount, @RequiresSSL, @NodeLinkedNodeID, @NodeOwner, @NodeCustomData, @NodeGroupID, @NodeLinkedNodeSiteID); SELECT SCOPE_IDENTITY() AS [NodeID]: caused exception: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_CMS_Tree_NodeLinkedNodeSiteID_CMS_Site". The conflict occurred in database "Kentico6Brasil", table "dbo.CMS_Site", column 'SiteID'. The statement has been terminated. Stack Trace: at CMS.DataEngine.AbstractDataConnection.HandleError(String queryText, SqlException ex) at CMS.DataProviderSQL.DataConnection.ExecuteScalar(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction) at CMS.DataEngine.GeneralConnection.ExecuteScalar(QueryParameters query) at CMS.DataEngine.GeneralConnection.ExecuteScalar(String queryName, QueryDataParameters parameters, String where, String orderBy, Int32 topN, String columns) at CMS.DataEngine.GeneralConnection.ExecuteScalar(String queryName, QueryDataParameters parameters) at CMS.DataEngine.SimpleDataClass.Insert(Boolean getId) at CMS.DataEngine.SimpleDataClass.Insert() at CMS.TreeEngine.TreeNode.Insert(TreeNode parent) at CMS.WorkflowEngine.ContentDocument.Insert(TreeNode parent, Boolean useDocumentHelper) at CMS.TreeEngine.TreeNode.Insert(Int32 parentNodeId, Boolean useDocumentHelper) at CMS.CMSImportExport.ImportProvider.ImportDocuments(SiteImportSettings settings, TranslationHelper th, List1& importedDocumentIDs, TreeProvider tree) at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at CMS.DataProviderSQL.DataConnection.ExecuteScalar(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)

ERROR:@@Error importing documents Message: [DataConnection.HandleError]: Query: INSERT INTO CMS_Tree ([NodeAliasPath], [NodeName], [NodeAlias], [NodeClassID], [NodeParentID], [NodeLevel], [NodeACLID], [NodeSiteID], [NodeGUID], [NodeOrder], [IsSecuredNode], [NodeCacheMinutes], [NodeSKUID], [NodeDocType], [NodeHeadTags], [NodeBodyElementAttributes], [NodeInheritPageLevels], [NodeChildNodesCount], [RequiresSSL], [NodeLinkedNodeID], [NodeOwner], [NodeCustomData], [NodeGroupID], [NodeLinkedNodeSiteID] ) VALUES ( @NodeAliasPath, @NodeName, @NodeAlias, @NodeClassID, @NodeParentID, @NodeLevel, @NodeACLID, @NodeSiteID, @NodeGUID, @NodeOrder, @IsSecuredNode, @NodeCacheMinutes, @NodeSKUID, @NodeDocType, @NodeHeadTags, @NodeBodyElementAttributes, @NodeInheritPageLevels, @NodeChildNodesCount, @RequiresSSL, @NodeLinkedNodeID, @NodeOwner, @NodeCustomData, @NodeGroupID, @NodeLinkedNodeSiteID); SELECT SCOPE_IDENTITY() AS [NodeID]: caused exception: The INSERT statement conflicted with the FOREIGN KEY constraint "FK_CMS_Tree_NodeLinkedNodeSiteID_CMS_Site". The conflict occurred in database "Kentico6Brasil", table "dbo.CMS_Site", column 'SiteID'. The statement has been terminated. Stack Trace: at CMS.CMSImportExport.ImportProvider.ImportDocuments(SiteImportSettings settings, TranslationHelper th, List1& importedDocumentIDs, TreeProvider tree) at CMS.CMSImportExport.ImportProvider.ImportDocumentsData(SiteImportSettings settings, TranslationHelper th) at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action1 wrapCloseInAction) at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) at System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() at System.Data.SqlClient.SqlDataReader.get_MetaData() at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString) at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, SqlDataReader ds) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource1 completion, Int32 timeout, Task& task, Boolean asyncWrite) at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) at System.Data.SqlClient.SqlCommand.ExecuteScalar() at CMS.DataProviderSQL.DataConnection.ExecuteScalar(String queryText, QueryDataParameters queryParams, QueryTypeEnum queryType, Boolean requiresTransaction)

0 votesVote for this answer Mark as a Correct answer

Filip Ligač answered on August 2, 2014 17:02

Hello Harshal,

At first, I would recommend that you install the latest hotfix for Kentico version 6 (6.0.58) on both Kentico instances (the one you export from and the one you import to as well) because there was a bug related to this issue fixed in one of the hotfixes.

However, it does not matter if the web site is blank or not, Bill had a point and his explanation of the cause was correct.

0 votesVote for this answer Mark as a Correct answer

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