Summary: the content_feeds_set_target() function only adds values to a node's CCK field, but it does not remove existing values first. Thus, if you are using Feeds to update nodes, the old values remain and new ones are added.

The expected behavior is that after an update, the only values that should end up on the node are the ones in the Feeds source (ie: the values in the CSV column, in the case of a CSV importer).

Perhaps that "expected behavior" is arguable... in some cases maybe you do want to continually add new values without removing the old, but it seems that would be an edge case, not vice-versa, as it is now. Maybe there should be an option in the UI for selecting which behavior is used.

See also:
#2070061: Content taxonomy mapper only adds terms
#2073745: Filefield mapper can only add files, not remove

CommentFileSizeAuthor
#1 feeds_content_update-2073671-1.patch431 bytesm.stenta
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

m.stenta’s picture

Status: Active » Needs review
FileSize
431 bytes

Patch attached which clears the CCK field on the node before adding any values to it.

twistor’s picture

twistor’s picture

twistor’s picture

Issue summary: View changes
Status: Needs review » Closed (outdated)