"Error importing 'Document relationships' objects" during the site import process

   —   
This article describes common reasons for this error and how to resolve the issue.
Under certain circumstances, the following error may appear during the site import process:

ERROR:  Error importing 'Document relationships' objects (cms.relationship)
Message: [ImportProvider.UpdateObject]: Cannot translate columns 'RightNodeID', import the dependent objects first. Stack Trace: at CMS.CMSImportExport.ImportProvider.UpdateObject(SiteImportSettings settings, GeneralizedInfo infoObj, Boolean siteObject, DataSet ds, TranslationHelper th, Boolean updateChild, Int32 targetSiteId, ProcessObjectEnum process, Dictionary`2 importedParentIDs, List`1 postProcessList, List`1 affectedObjects, BaseInfo parentObject, Boolean postProcessing)
at CMS.CMSImportExport.ImportProvider.ImportObjects(SiteImportSettings settings, DataSet ds, String objectType, Boolean siteObjects, TranslationHelper th, Boolean importChild, ProcessObjectEnum processType, Dictionary`2 importedParentIDs)


ERROR:  Error importing documents
Message: [ImportProvider.UpdateObject]: Cannot translate columns 'RightNodeID', import the dependent objects first. Stack Trace: at CMS.CMSImportExport.ImportProvider.ImportObjects(SiteImportSettings settings, DataSet ds, String objectType, Boolean siteObjects, TranslationHelper th, Boolean importChild, ProcessObjectEnum processType, Dictionary`2 importedParentIDs)
at CMS.CMSImportExport.ImportProvider.ImportObjectType(SiteImportSettings settings, String objectType, Boolean siteObject, TranslationHelper th, ProcessObjectEnum process, Dictionary`2 importedParentIDs)
at CMS.CMSImportExport.ImportProvider.ImportDocumentsData(SiteImportSettings settings, TranslationHelper th)

ERROR:  Error during import process
Message: [ImportProvider.UpdateObject]: Cannot translate columns 'RightNodeID', import the dependent objects first. Stack Trace: at CMS.CMSImportExport.ImportProvider.ImportDocumentsData(SiteImportSettings settings, TranslationHelper th)
at CMS.CMSImportExport.ImportProvider.ImportObjectsData(SiteImportSettings settings)


This error occurs when the site export package contains relationships (related documents) to linked documents from another site which is not contained in the export package.  Let’s say the source instance contains three sites: a Corporate site, an Intranet site, and an E-commerce site.  In the Corporate site you may have linked documents from the Intranet site or the E-commerce site.  However, if this linked document is missing on the target instance you are importing the site to, the above error message will appear.

The easiest solution is to find the documents which belong to a different site and remove their links, or ensure these documents exist on the target instance (DB) before importing the given export package.
You can use the SQL query below for this purpose.  Please note you may need to update it according to your setup.

SELECT NodeID, NodeAliasPath, NodeName, NodeAlias, NodeSiteID
FROM CMS_Tree
WHERE NodeID IN (SELECT RightNodeID FROM CMS_Relationship) AND NodeSiteID <> (SELECT SiteID FROM CMS_Site WHERE SiteName = 'CorporateSite')


The ‘CorporateSite‘ name must be replaced by the codename of the given web site.
-rm-


See also: Related docs

Applies to: Kentico CMS 7.x
Share this article on   LinkedIn