Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
So I am trying to import a simple csv file that looks like this,
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.
The id is the id of the datasource not an Umbraco id. CMSImport currently only can update records that were imported using CMSImport.
Is there anything we can do get round this?
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
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 :)
Cool will insert into the table quick and dirty.
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?
Ok if i turn off update then the record gets created as a new record
That is normal indeed. Update will update existing nodes
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?
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 .....
Some db hacks it is then lol
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted