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.
At the model_entity_info(), there's only two entity keys defined; id and bundle.
There should also be 'label' key for defining the "name" property of an entity (title for nodes). In Model's case its 'name'.
Bumped into this when using Entity Reference module that is trying to get the 'label' key when searching entities within it's autocomplete widget.
Patch attached.
Comment | File | Size | Author |
---|---|---|---|
entity-keys-label.patch | 513 bytes | iSampo |
Comments
Comment #1
a.ross CreditAttribution: a.ross commentedYes, also ran into this when testing with auto_entitylabel. But this patch isn't sufficient, as the entity create form should make use of it as well.
Comment #2
ronald_istos CreditAttribution: ronald_istos commentedDon't see the same issue anymore so closing now.