I have created a custom feed importer but each time it runs it creates the same content again. How can I make it only create the content once?


In order to update existing nodes, Feeds needs a unique ID to match the source item with the target node. Otherwise, Feeds cannot know which node to update, so it just creates a new one.

When configuring the mapping for your feed importer, choose a unique field in the source, map it to the 'GUID' target and check the 'unique target' checkbox.

| improve this answer | |

Use the Unique field module to assure that nodes with fields you specify as unique cannot be saved twice. Here is an excerpt about it from the module's project page:

... performs additional validation when a node is created or updated by a user to require that a node's title, author, language, and CCK fields are unique within a given context.

Without this module, Drupal and CCK do not prevent multiple nodes from having the same title or the same value in a certain field.

For example, if you have a content type with a date field and there should only be one node per date, you could use this module to prevent a node from being saved with a date already used in another node.

| improve this answer | |

There is a setting under admin/structure/feeds/{importer name} >> Basic settings >> settings >> Periodic import , you have to turn this off in order to avoid recreation of previously imported content.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.