Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to reproduce:
- Install 8.x with the standard profile.
- Go to
admin/structure/types/manage/article/comment/fields
. - Delete the comment body field. The field is deleted, but you will see the exception:
Drupal\Core\Entity\Query\QueryException: node_type not found in Drupal\field_sql_storage\Entity\Tables->ensureEntityTable() (line 100 of /.../core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php
The bug also occurs with field instances on taxonomy vocabularies, but not with fields on node types. ManageFieldsTest
does not catch it because it uses node rather than a test entity. I'm working on converting that test to expose the bug.
Comments
Comment #1
swentel CreditAttribution: swentel commentedalso reported in #1845372: Deleting a field from a non-node entity bundle results in an Entity Field Query Exception - it's EFQ2
Comment #2
xjm