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:
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.
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.
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?
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 .....
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:
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
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
Richard,
Is there anything we can do get round this?
Cheers
Ismail
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
One thing, should it not create new nodes? I get import complete but no new nodes created or updated.
After you hacked the table? The it should update nodes. New nodes only will be created during import
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
I would think as well. Document location correct? It's the core feature that should always work :)
Richard,
Cool will insert into the table quick and dirty.
Regards
Ismail
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
Ok if i turn off update then the record gets created as a new record
That is normal indeed. Update will update existing nodes
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
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 .....
Richard,
Some db hacks it is then lol
is working on a reply...