Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Profiterole 232 posts 264 karma points
    Oct 18, 2011 @ 17:52
    Profiterole
    0

    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"

     

    Any idea why it does that?

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Oct 18, 2011 @ 20:36
    Richard Soeteman
    0

    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

  • Profiterole 232 posts 264 karma points
    Oct 18, 2011 @ 20:44
    Profiterole
    0

    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.

  • Profiterole 232 posts 264 karma points
    Oct 18, 2011 @ 21:14
    Profiterole
    0

    Ok, finaly it appears in developer section... I just needed to restarmy browser. However, I can't import my csv.

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Oct 19, 2011 @ 19:08
    Richard Soeteman
    0

    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

  • Profiterole 232 posts 264 karma points
    Oct 19, 2011 @ 19:25
    Profiterole
    0

    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 :

    -- 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...
    delete from cmsPreviewXml where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)
    delete from cmsContentVersion where ContentId in (select id from umbracoNode where path like '%-20%' and id!=-20)
    delete from cmsContent where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)
    delete from cmsContentXML where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)
    delete from cmsDocument where nodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)
    delete from cmsPropertyData where contentNodeId in (select id from umbracoNode where path like '%-20%' and id!=-20)
    -- delete the XML nodes....
    delete from umbracoNode where path like '%-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?

  • Richard Soeteman 4035 posts 12842 karma points MVP
    Oct 20, 2011 @ 12:19
    Richard Soeteman
    0

    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

  • Profiterole 232 posts 264 karma points
    Oct 21, 2011 @ 16:34
    Profiterole
    0

    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!

Please Sign in or register to post replies

Write your reply to:

Draft