Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10056 karma points MVP 2x admin c-trib
    Mar 15, 2018 @ 11:29
    Ismail Mayat
    0

    Update issue

    Hello,

    So I am trying to import a simple csv file that looks like this,

    ID,Alias,Name,bookOnlineText,activateLiveTickets 1279,blackpool-sea-life-centre,SEA LIFE Blackpool,Special Offers,1

    Where id is nodeid. The fields that i am mapping to are simple text fields except the last one which is true / false

    My mapping definition looks like this:

    enter image description here

    I am making the assumption that ID will map to node id in umbraco is that what cmsimport will do? The ids in my csv are real existing umbraco node ids.

    After running import it says 1 record updated and no errors. However checking that item it has not updated.

    Regards

    Ismail

  • Richard Soeteman 3827 posts 11858 karma points MVP
    Mar 15, 2018 @ 11:36
    Richard Soeteman
    0

    Hi Ismail,

    The id is the id of the datasource not an Umbraco id. CMSImport currently only can update records that were imported using CMSImport.

    Best,

    Richard

  • Ismail Mayat 4511 posts 10056 karma points MVP 2x admin c-trib
    Mar 15, 2018 @ 11:39
    Ismail Mayat
    0

    Richard,

    Is there anything we can do get round this?

    Cheers

    Ismail

  • Richard Soeteman 3827 posts 11858 karma points MVP
    Mar 15, 2018 @ 11:46
    Richard Soeteman
    0

    Hi Ismail,

    You can manually fill the CMSImportrelation table that is what CMSImport uses to determine if it needs to update the data or you can use the record importing event.

    Best,

    Richard

  • Ismail Mayat 4511 posts 10056 karma points MVP 2x admin c-trib
    Mar 15, 2018 @ 13:16
    Ismail Mayat
    0

    One thing, should it not create new nodes? I get import complete but no new nodes created or updated.

  • Richard Soeteman 3827 posts 11858 karma points MVP
    Mar 15, 2018 @ 13:18
    Richard Soeteman
    0

    After you hacked the table? The it should update nodes. New nodes only will be created during import

  • Ismail Mayat 4511 posts 10056 karma points MVP 2x admin c-trib
    Mar 15, 2018 @ 13:21
    Ismail Mayat
    0

    No without hacking table i would have thought import should have created new nodes?

    Btw we are going to tap into recordimporting instead just downloading sample zip to rip some code

  • Richard Soeteman 3827 posts 11858 karma points MVP
    Mar 15, 2018 @ 13:23
    Richard Soeteman
    0

    I would think as well. Document location correct? It's the core feature that should always work :)

  • Ismail Mayat 4511 posts 10056 karma points MVP 2x admin c-trib
    Mar 15, 2018 @ 11:49
    Ismail Mayat
    0

    Richard,

    Cool will insert into the table quick and dirty.

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10056 karma points MVP 2x admin c-trib
    Mar 15, 2018 @ 13:27
    Ismail Mayat
    0

    Richard,

    Just trying again with a smaller csv, one thing to note the place where i am going to create is a listview. That should have no bearing on the matter though?

    Regards

    Ismal

  • Ismail Mayat 4511 posts 10056 karma points MVP 2x admin c-trib
    Mar 15, 2018 @ 13:32
    Ismail Mayat
    0

    Ok if i turn off update then the record gets created as a new record

  • Richard Soeteman 3827 posts 11858 karma points MVP
    Mar 15, 2018 @ 13:33
    Richard Soeteman
    0

    That is normal indeed. Update will update existing nodes

  • Ismail Mayat 4511 posts 10056 karma points MVP 2x admin c-trib
    Mar 15, 2018 @ 13:35
    Ismail Mayat
    0

    Richard,

    Ok cool. So if want to do the mapping of id in csv i need to implement RecordImporting event then in there what do i need to do?

    Regards

    Ismail

  • Richard Soeteman 3827 posts 11858 karma points MVP
    Mar 15, 2018 @ 13:53
    Richard Soeteman
    100

    Ah sorry, thought it was possible with recordimporting event but the import action is missing there only recordimported has the import action property.

    Best to add relations to the database or wait until v4 but that will take some time to complete .....

  • Ismail Mayat 4511 posts 10056 karma points MVP 2x admin c-trib
    Mar 15, 2018 @ 14:20
    Ismail Mayat
    0

    Richard,

    Some db hacks it is then lol

Please Sign in or register to post replies

Write your reply to:

Draft