Automatically closed - issue fixed for 2 weeks with no activity.
If you define an entity reference field as a base field in code, and the entity type that the field references doesn't exist, you get an exception about the missing entity type. But the exception message doesn't tell you anything about the field.
This means that a developer who has messed up their field definitions, or who hasn't enabled all the right modules in a Kernel test, doesn't know where to look for the problem.
Either:
- Define an entity reference base field on an entity type with a made-up referenced entity type
- Create a kernel test, enable a module that provides and entity type with an entity reference base field, but don't enable the module that provides the referenced entity type
You get this exception:
> Drupal\Component\Plugin\Exception\PluginNotFoundException: The "taxonomy_term" entity type does not exist.
EntityReferenceItem should catch this exception and throw a FieldException instead, stating the location of the problem, e.g.:
> Drupal\Core\Field\FieldException: Field 'foo' on entity type 'my_entity' references a target entity type 'taxonomy_term' which does not exist.
Do it.
Update any tests that expect the exception.
None.
A different type of exception is now thrown.
None.
Fixed
10.1 ✨
Used to track the progress of issues reviewed by the Drupal Needs Review Queue Initiative.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed - issue fixed for 2 weeks with no activity.