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!

Comments

Andy-vv created an issue. See original summary.

Korinvall’s picture

The 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).

megachriz’s picture

Component: Code » Documentation
Status: Active » Needs review
StatusFileSize
new1.5 KB

Korinvall 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.

megachriz’s picture

StatusFileSize
new1.49 KB
new956 bytes

Removing 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().

  • MegaChriz committed d4afd62 on 8.x-3.x
    Issue #3051916 by MegaChriz: Added help text for mapping form page.
    
megachriz’s picture

Status: Needs review » Fixed

Committed #4.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.