Error while importing data for property 'motsCles' :An item with the same key has already been added.
Hi,
I have CMSImport 2.1 on 4.7.1 Umbraco. I try to import a csv file. I alway get the error in the title, and, if I completely delete the column motsCles, the preceding column will throw the error.
Here's my csv file :
nodeName;ficheID;parentID;ficheAncre;ID;motsCles
"Présentation de la section Trucs et conseils";1001;1001;;1001;"études, devoirs, travaux scolaires, astuces, trucs, manières"
"Quelques astuces pour chercher dans la BV 2.0";1002;1002;;1002;"outil de recherche, simplifié, avancée, table des matières, alphabétique, bv2, truc de recherche"
"J’ai une question sur quelque chose… mais je ne sais pas quoi!";1002;1002;"a1";"1002a1";"outil de recherche, simplifié, avancée, table des matières, alphabétique, bv2, truc de recherche"
It's saved in utf-8 and waa working before my update to umbraco 4.7.1 and CMSImport 2.1. Also, I saw that cmsimort "node" in developer section does not appear, but the package is installed.
For my mapping, all properties are textstring nammed like in the csv file.
Sorry haven't got the time to do the exact mapping today. will do that tomorrow. You mentioned that it have worked before. Maybe the upgrade didn't succeed and old binaries are being referenced. Can you try to copy the dll's from the package zip file to your Umbraco install?
CMSImport works for other nodes/doctype and my csv works, but not for the nodes/doctype I'm trying to import.
Here's the whole story :
I created a new doctype for a new catalog and I had about 5000 nodes to import. I tried to import all nodes at once and, but after 45 minutes, I closed umbraco thinking it was frozen.
The next day, I separated my file into 5 x 1000 nodes files and the problem comes. I saw that nodes from the umbraco freeze were in the Recyclebin and I use this code :
-- Uncomment below to verify the number of nodes returned is the-- same as the number of nodes that is in the Recycle Bin-- select * from umbracoNode where path like '%-20%' and id!=-20-- Delete all 'related' nodes and table contents...deletefrom cmsPreviewXml where nodeId in (select id from umbracoNode wherepathlike'%-20%'and id!=-20)
deletefrom cmsContentVersion where ContentId in (select id from umbracoNode wherepathlike'%-20%'and id!=-20)
deletefrom cmsContent where nodeId in (select id from umbracoNode wherepathlike'%-20%'and id!=-20)
deletefrom cmsContentXML where nodeId in (select id from umbracoNode wherepathlike'%-20%'and id!=-20)
deletefrom cmsDocument where nodeId in (select id from umbracoNode wherepathlike'%-20%'and id!=-20)
deletefrom cmsPropertyData where contentNodeId in (select id from umbracoNode wherepathlike'%-20%'and id!=-20)
-- delete the XML nodes....deletefrom umbracoNode wherepathlike'%-20%'and id!=-20
to empty the bin because the backend could not. So, I'm wondering if the nodes relations are not somewhere in the database and causing conflicts?
Just used the file again with mapped the properties exactly as you did on the exact environment. I think you are probably right about your assumption that your DB remove is causing this issue. There is one table that CMSImport uses to lookup if a node already exists this is CMSImportRelation and in case of an existing relation it does an update instead of insert.These releations will normally automatically be removed when you empty the recylce bin. Since you've done this by hand the relations are not removed.
The key is stored in the field DataSourceKey and contains [datasourcealias][key][value] for example CsvID1002a1
Hi! I looked in the DB and there was nothing in CMSImportRelation table. So, I rename all my properties with new aliases and it worked. So I guess my problem is solved!
Error while importing data for property 'motsCles' :An item with the same key has already been added.
Hi,
I have CMSImport 2.1 on 4.7.1 Umbraco. I try to import a csv file. I alway get the error in the title, and, if I completely delete the column motsCles, the preceding column will throw the error.
Here's my csv file :
Any idea why it does that?
Hi,
Just copied and paste you csv and it worked fine. Did you save your csv as UTF-8? If so I'm interested in your mapping
Thanks,
Richard
Hi Richard,
It's saved in utf-8 and waa working before my update to umbraco 4.7.1 and CMSImport 2.1. Also, I saw that cmsimort "node" in developer section does not appear, but the package is installed.
For my mapping, all properties are textstring nammed like in the csv file.
Ok, finaly it appears in developer section... I just needed to restarmy browser. However, I can't import my csv.
Hi,
Sorry haven't got the time to do the exact mapping today. will do that tomorrow. You mentioned that it have worked before. Maybe the upgrade didn't succeed and old binaries are being referenced. Can you try to copy the dll's from the package zip file to your Umbraco install?
Thanks,
Richard
Hi,
CMSImport works for other nodes/doctype and my csv works, but not for the nodes/doctype I'm trying to import.
Here's the whole story :
I created a new doctype for a new catalog and I had about 5000 nodes to import. I tried to import all nodes at once and, but after 45 minutes, I closed umbraco thinking it was frozen.
The next day, I separated my file into 5 x 1000 nodes files and the problem comes. I saw that nodes from the umbraco freeze were in the Recyclebin and I use this code :
to empty the bin because the backend could not. So, I'm wondering if the nodes relations are not somewhere in the database and causing conflicts?
Hi,
Just used the file again with mapped the properties exactly as you did on the exact environment. I think you are probably right about your assumption that your DB remove is causing this issue. There is one table that CMSImport uses to lookup if a node already exists this is CMSImportRelation and in case of an existing relation it does an update instead of insert.These releations will normally automatically be removed when you empty the recylce bin. Since you've done this by hand the relations are not removed.
The key is stored in the field DataSourceKey and contains [datasourcealias][key][value] for example CsvID1002a1
Hope this helps you,
Richard
Hi! I looked in the DB and there was nothing in CMSImportRelation table. So, I rename all my properties with new aliases and it worked. So I guess my problem is solved!
is working on a reply...