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.
I created field with type Entity Reference and selected exists Entity Type as Target type. Then I deleted this Entity Type, after that I see error when I'm trying to edit settings of this field to change Target Entity type to another:
EntityFieldQueryException: Entity <em class="placeholder">{entity_name}</em> has no base table. in EntityFieldQuery->propertyQuery() (line 1191 of includes/entity.inc).
So I should to remove this field and create new one instead of just edit exist field settings and change Target Entity type.
Comment | File | Size | Author |
---|---|---|---|
#1 | 1345340-entityreference-missing-entity-type.patch | 1.17 KB | Damien Tournoud |
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedHere is a proposal patch to make the base selection handler more robust in this case.
Comment #3
amitaibuMaybe we should have this logic already in entityreference_get_selection_handler() -- like this other modules implementing a selection handler don't need to take care of this?
Comment #4
Damien Tournoud CreditAttribution: Damien Tournoud commentedMerged into 7.x-1.x
This cannot be in
entityreference_get_selection_handler()
because there is no reason to impose that selection handlers only work on local entity types.