Hello, I am a bit of a newbie to drupal and feeds. I am using the UI to set up a feed from a csv file. The feed works fine and imports data nicely. But now I want to update the records. I have selected the "update records" option in the fetcher settings. What I do not know how to do is set up a mapping that identifies how and if a feed item has changed. There are a lot of options available in the mapping and I have tried a few, but nothing seems to work. Can anyone tell me which settings I need to make in order that the feed recognises the changed content?
I| have attached a screenshot of my current mapping, and also the error message I get when trying to update.. This works OK on first import, but not on the second one.
Any help would be much appreciated!
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | interdiff-3051916-3-4.txt | 956 bytes | megachriz |
| #4 | feeds-mapping-help-text-3051916-4.patch | 1.49 KB | megachriz |
| Screen Shot 2019-05-01 at 12.50.14 PM.png | 177.27 KB | Andy-vv | |
| Screen Shot 2019-05-01 at 12.33.43 PM.png | 332.96 KB | Andy-vv |
Comments
Comment #2
Korinvall commentedThe image of the mapping you shared doesn't show any of the unique checkboxes actually checked. I'm guessing your intent was to have source item 0 (labeled "Item GUID") play that role. In the mapping, if you check the box to the right under the "unique" column for your "Item GUID," the importer will have the ability to compare previous imports to new ones (using the Item GUID) and then make an update (if any values have changed).
Comment #3
megachrizKorinvall is correct. One target needs to be marked as unique to avoid importing duplicates. In the D7 version of Feeds, this was explained briefly at the top of the mapping form, but that help text is missing in the D8 version. Adding a patch to add that help text.
Comment #4
megachrizRemoving CSS class "help" from help text. I first had put the code in the mapping form class, where that CSS class would have made sense, but later thought that help texts should ideally be defined in an implementation of
hook_help().Comment #6
megachrizCommitted #4.