How to export custom form control and import to another evironment

Son Dang asked on June 24, 2024 11:26

Hi,

I have custom form control (Custom Category Selector example) I can export object form control "Custom Category Selector", after that I deployed code to UAT env. So I can not import the object form control "Custom Category Selector" to UAT env.

I got error: Error during import process ERROR: Error during import process Message: The table (element) cannot be the child table to itself in nested relations.

Exception type: System.ArgumentException Stack trace: at System.Data.DataRelation.CheckNestedRelations() at System.Data.DataRelation.set_Nested(Boolean value) at System.Data.XSDSchema.InstantiateTable(XmlSchemaElement node, XmlSchemaComplexType typeNode, Boolean isRef) at System.Data.XSDSchema.HandleTable(XmlSchemaElement node) at System.Data.XSDSchema.HandleParticle(XmlSchemaParticle pt, DataTable table, ArrayList tableChildren, Boolean isBase) at System.Data.XSDSchema.HandleComplexType(XmlSchemaComplexType ct, DataTable table, ArrayList tableChildren, Boolean isNillable) at System.Data.XSDSchema.InstantiateTable(XmlSchemaElement node, XmlSchemaComplexType typeNode, Boolean isRef) at System.Data.XSDSchema.HandleTable(XmlSchemaElement node) at System.Data.XSDSchema.HandleParticle(XmlSchemaParticle pt, DataTable table, ArrayList tableChildren, Boolean isBase) at System.Data.XSDSchema.HandleComplexType(XmlSchemaComplexType ct, DataTable table, ArrayList tableChildren, Boolean isNillable) at System.Data.XSDSchema.InstantiateTable(XmlSchemaElement node, XmlSchemaComplexType typeNode, Boolean isRef) at System.Data.XSDSchema.HandleTable(XmlSchemaElement node) at System.Data.XSDSchema.HandleParticle(XmlSchemaParticle pt, DataTable table, ArrayList tableChildren, Boolean isBase) at System.Data.XSDSchema.HandleComplexType(XmlSchemaComplexType ct, DataTable table, ArrayList tableChildren, Boolean isNillable) at System.Data.XSDSchema.InstantiateTable(XmlSchemaElement node, XmlSchemaComplexType typeNode, Boolean isRef) at System.Data.XSDSchema.HandleTable(XmlSchemaElement node) at System.Data.XSDSchema.LoadSchema(XmlSchemaSet schemaSet, DataSet ds) at System.Data.DataSet.InferSchema(XmlDocument xdoc, String[] excludedNamespaces, XmlReadMode mode) at System.Data.DataSet.ReadXmlSchema(XmlReader reader, Boolean denyResolving) at CMS.DataEngine.DataClassInfo.CreateSchemaDataSet() at CMS.DataEngine.DataClassInfo.get_SchemaDataSet() at CMS.DataEngine.DataClassInfoProvider.GetDataSet(String className) at CMS.DataEngine.ObjectHelper.GetObjectsDataSet(OperationTypeEnum operation, GeneralizedInfo infoObj, Boolean childData) at CMS.CMSImportExport.ImportProvider.GetEmptyDataSet(SiteImportSettings settings, String objectType, Boolean siteObjects, Boolean selectionOnly, GeneralizedInfo& infoObj, Boolean forceXMLStructure) at CMS.CMSImportExport.ImportProvider.LoadObjects(SiteImportSettings settings, String objectType, Boolean siteObjects, Boolean selectionOnly, Boolean forceXMLStructure) at CMS.CMSImportExport.ImportProvider.ImportObjectType(SiteImportSettings settings, String objectType, Boolean siteObject, TranslationHelper th, ProcessObjectEnum processType, List`1 importedParentIds) at CMS.CMSImportExport.ImportProvider.ImportObjectsDataInternal(SiteImportSettings settings)

Any suggest for this?

Recent Answers


Juraj Ondrus answered on June 25, 2024 13:08

What is the exact export process? It seems that you are exporting also something else. Are you exporting a single object or are you exporting a site and then selecting just the form control? Exporting objects vs. Exporting SINGLE object

0 votesVote for this answer Mark as a Correct answer

Son Dang answered on June 26, 2024 03:47

Hi Juraj Ondrus, I used Exporting single object (Form controls), after that I access Site --> Import site or objects to import to another environment. But I got error in the import processing.

0 votesVote for this answer Mark as a Correct answer

Juraj Ondrus answered on June 26, 2024 06:39

This is strange - so, how did you deployed the code? This sounds like there is already a record in the DB already. HAve you checked the DB tables?

0 votesVote for this answer Mark as a Correct answer

Son Dang answered on June 27, 2024 05:50

Hmmm... I had checked DB (no problem). I try to build another CMS Kentico and use that package (export on current CMS) to import successfully. I am investigating to find root cause with current CMS. Thanks

0 votesVote for this answer Mark as a Correct answer

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