Got this error when trying to add new element to form:
Error: Class 'Drupal\taxonomy\Entity\Vocabulary' not found in Drupal\webform\Plugin\WebformElement\WebformTermCheckboxes->preview() (line 27 of /var/app/current/web/modules/contrib/webform/src/Plugin/WebformElement/WebformTermReferenceTrait.php) #0

When I enabled Taxonomy module, it started working again. So is Taxonomy dependency of Webforms? If so then it should be in the .info file.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hkirsman created an issue. See original summary.

hkirsman’s picture

Title: rror: Class 'Drupal\taxonomy\Entity\Vocabulary' not found » Error: Class 'Drupal\taxonomy\Entity\Vocabulary' not found
hkirsman’s picture

hkirsman’s picture

webform-make_taxonomy_as_dependency-2937258-3.patch is for latest dev release. I need patch for the rc1 which I'll add here

jrockowitz’s picture

Status: Active » Needs review
FileSize
786 bytes

WebformTermCheckboxes element is missing its dependencies in its annotation.

  • jrockowitz committed 904e75f on 8.x-5.x
    Issue #2937258 by hkirsman, jrockowitz: Error: Class 'Drupal\taxonomy\...
jrockowitz’s picture

Status: Needs review » Fixed
hkirsman’s picture

So the Taxonomy module doesn't need to be active with this kind of code?

jrockowitz’s picture

Yes, any taxonomy related webform elements are completely disabled if the taxonomy.module is not installed.

Status: Fixed » Closed (fixed)

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