I used Feeds some years ago in a normal way (importing & tagging nodes)
Now i wish to import and create nodes only by the terms that exists and avoid to
import not matching feeds.
Before going on work..it's possible ?

Thx

Comments

senzaesclusiva created an issue. See original summary.

senzaesclusiva’s picture

Issue summary: View changes
MegaChriz’s picture

Status: Active » Fixed

Yes, I think this is possible with the Feeds Tamper plugins "Entity Field Query finder" and "Required field".

  1. Map the category (tags) source to a dummy target, for example "Temporary target".
  2. Add a tamper plugin of "Entity Field Query finder" to this target. Set "Entity type" to "Taxonomy term", "Bundle" to the vocabulary in question and "Field" to "name".
  3. Then add a "Required field" plugin to the same target.

This should result into that an item is not imported if it uses a term that doesn't exist in the vocabulary.

If this doesn't work or your conditions are more complex you could also either implement the hooks hook_feeds_after_parse() or hook_feeds_presave() to remove or skip items.

senzaesclusiva’s picture

Thanks MegaChriz for your kind answer.
I don't need more complex conditions; only avoid to create tons of "orphan nodes" that doesn't match with vocabulary content.
I'll try your step-by-step hint tomorrow morning.

Have a nice day

Status: Fixed » Closed (fixed)

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