Although the UI sorta tries to prevent you from messing it up, it is still possible to save imported terms with an incorrect (or unset) vocabulary ID.
I could end up with a number of homeless terms in the database, assigned to no vocab. This makes them invisible, and also hides any problem the import was having.
As taxonomy_term_save() doesn't check if the new term actually has a vocab ID set, we must do it ourselves.
Patch coming.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dman’s picture

Status: Active » Needs review
FileSize
480 bytes
+    if (empty($term->vid)) {
+      throw new FeedsValidationException(t('Term vocabulary missing.'));
+    }
twistor’s picture

Issue summary: View changes
Status: Needs review » Fixed

I couldn't reproduce this.

I've added a test here, to verify things.
http://drupalcode.org/project/feeds.git/commit/d66f313

FeedsTermProcessor::vocabulary() throws an exception if a vocabulary doesn't exist. If I'm missing something, please mention it.

It has been a long time, so who knows.

dman’s picture

To replicate you'd need a data source that supplied raw tid data that you thought you could trust, but if, for example you'd deleted the target term locally (or otherwise just had crappy input) then this would make it into the system.
Or at least it seemed that it did WAY back when I found this issue.
Probably good now - the patch was just a fix that I needed at that time (due to bad input) then so shared.

Cheers!

twistor’s picture

Category: Feature request » Bug report
Status: Fixed » Needs work

That sounds like it might still be a problem.