Problem/Motivation

When using devel generate on a content type that has a term reference field, it will reference any term, not just terms in the allowed vocabulary.

Steps to reproduce:

  1. Have a couple vocabularies.
  2. Create a content type with a term reference field, and allow terms from only one of those vocabularies in the field.
  3. Generate a bunch of nodes in that content type.
  4. See terms from other vocabularies displaying on the generated content.

Also worth noting:

If you edit one of the generated nodes and select allowed terms, the ones from non-referenced fields will be removed from the node when you save.

I'm on Mac OS X Yosemite, using MAMP and PHP 5.6.2. I've experienced this in Chrome, Safari and Firefox. Haven't tested elsewhere.

Comments

willzyx’s picture

@rainbreaw thanks for reporting.
This issue doesn't seems to be related to devel since the creation logic for dummy terms is in core (see \Drupal\Core\Field\Plugin\Field\FieldType\EntityReferenceItem::generateSampleValue()).
However, I did some testing and I was unable to replicate the fault; Are you using HEAD version of drupal and devel?

willzyx’s picture

Status: Active » Postponed (maintainer needs more info)
willzyx’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Closing for lack of activity. Feel free to reopen if the issue still exists