Is it possible to change the guid of a feed and update existing nodes? I've been trying to get this to work for several hours, but there doesn't seem to be any way to set a different guid and update existing nodes, as opposed to creating new ones.
Here is the situation:
I have a large dataset, originally imported from a .csv via feeds. It contains at least two unique fields.
I chose one of the fields to be the guid.
Now, I have data coming in from another source that uses a different unique field. (Included in the original data, but not set as the guid.) These are also in .csv files.
Ideally, I could just change the mapping of the guid and import the new data, to update existing nodes. When I attempt to do this, I create new nodes.
I have tried:
setting the new guid to not unique
setting the new guid to unique
not setting any guid and importing the new data
All of these result in the creation of new nodes.
I can't leave the original guid mapped, because mapping fields that are not included in the new data results in them being overwritten by blanks.
Is there any way to do this? Please let me know.
Comments
Comment #1
jenyum CreditAttribution: jenyum commentedComment #2
twistor CreditAttribution: twistor commentedCan you try this? Leave the GUID field mapping, keep it marked unique. Then add the second mapping, to the URL field and mark that as also unique.
Comment #3
jenyum CreditAttribution: jenyum commentedThat updated the nodes, but didn't populate the new field that I need to populate. There is nothing special about this field, it's not unique and it's a plain text cck field. Why would it not pull in the new field for existing nodes? If I try this without the unique identifier problem it works.
Edited to add: For now, I have solved this problem by calling the source of the new data and requesting the other field. (Which they have! Problem solved. Why did I stay up all night working on this?) But this is functionality that feeds probably should have, because I can't imagine I'm the only person who will ever discover she needs to change the unique identifier.
Comment #4
twistor CreditAttribution: twistor commentedWhat is you Update/Replace/Skip existing setting?
Comment #5
jenyum CreditAttribution: jenyum commentedUpdate existing nodes. I need to add or update a field on an existing node.
Comment #6
jaysonjaynes CreditAttribution: jaysonjaynes commentedI don't know if this is off this topic, but I have old, existing nodes that I tried to add a GUID to (it wasn't assigned already), and then use that to match on another Feed, but it's not working for the ones I've updated, but does work for new nodes I imported with a GUID. My question: Does a GUID have to be assigned when you first upload, or can it be assigned after?
Comment #7
MegaChriz CreditAttribution: MegaChriz commentedTo update existing nodes, you need to have an unique target. This doesn't have to be the GUID. This basically means you can assign a GUID later on.
In order to update existing nodes, the following conditions must be met:
If you can meet these conditions without assigning a GUID, then it is possible to assign a GUID later on to update nodes.
Comment #8
jaysonjaynes CreditAttribution: jaysonjaynes commentedThanks, MegaChriz! I'll try the Field validation module along with the patch. The thing is, it works for nodes that I imported a unique GUID in the initial import, but not the ones that I updated with unique GUIDs in a second import. Strange, but I'll try what you suggested.