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.
Notice: Undefined index: label in __construct() (line 75 of sites/all/modules/linkit/plugins/linkit_search/entity.class.php)
I think this is because entities don't have to set $entity_info[$entity_type]['entity keys']['label']
, when 'label callback' is defined.
I see the label key is necessary for Linkit to perform its searches, though. Perhaps entities without a label key should not be listed as options in the Linkit profile settings. Or Linkit should try to guess the label key, trying perhaps 'title', 'name', and 'label'.
Comments
Comment #1
anouI've got the same issue:
Appears when I want to add a profile for example: admin/config/content/linkit/add
Comment #2
sahaj CreditAttribution: sahaj commentedGetting the same message. No idea what to do?
Comment #3
anonSo if ['entity keys']['label' isn't defined, can you use label_callback() instead?
If someone provides me a patch, I'll take a look at it.
EDIT: What type of entity do you have that do NOT have label defined?
Comment #4
azovsky CreditAttribution: azovsky commentedIn my case there is an error "Undefined index: label ..." for FieldCollectionItemEntity.
Comment #5
azovsky CreditAttribution: azovsky commentedIf you use the Field collection module, then perhaps it would be useful to address this issue: see #3 in #1263674: Add bundle keys to entity_info.
Comment #6
anonCommited a fix to 7.x-3.x
Comment #8
screon CreditAttribution: screon commentedI am on 7.x-3.x and I still encounter the issue described by anou