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.

Comments

dman’s picture

Status: Active » Needs review
StatusFileSize
new480 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.

bluegeek9’s picture

Status: Needs work » Closed (outdated)

Drupal 7 reached end of life and the D7 version of Feeds is no longer being developed. To keep the issue queue focused on supported versions, we’re closing older D7 issues.

If you still have questions about using Feeds on Drupal 7, feel free to ask. While we won’t fix D7 bugs anymore, we’re happy to offer guidance to help you move forward. You can do so by opening (or reopening) a D7 issue, or by reaching out in the #feeds channel on Drupal Slack.

If this issue is still relevant for Drupal 10+, please open a follow-up issue or merge request with proposed changes. Contributions are always welcome!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.