Label is not defined in taxonomy_entity_info entity keys
I looked at the Drupal 7 version of taxonomy_entity_info and it defines label under
I opened an issue over in the 'Title' module where it wasn't checking whether that array key existed and @argiepiano suggested opening a core issue
Current code
in core/modules/taxonomy/taxonomy.module
$entity_info = array(
'taxonomy_term' => array(
'label' => t('Taxonomy term'),
'bundle label' => t('Vocabulary'),
'entity class' => 'TaxonomyTerm',
'controller class' => 'TaxonomyTermController',
'base table' => 'taxonomy_term_data',
'token type' => 'term',
'fieldable' => TRUE,
'redirect support' => TRUE,
'entity keys' => array(
'id' => 'tid',
'bundle' => 'vocabulary',
),
Suggested Code
$entity_info = array(
'taxonomy_term' => array(
'label' => t('Taxonomy term'),
'bundle label' => t('Vocabulary'),
'entity class' => 'TaxonomyTerm',
'controller class' => 'TaxonomyTermController',
'base table' => 'taxonomy_term_data',
'token type' => 'term',
'fieldable' => TRUE,
'redirect support' => TRUE,
'entity keys' => array(
'id' => 'tid',
'bundle' => 'vocabulary',
'label' => 'name'
),
I don't fully understand what label is notating in this case, so I'll wait for someone else to chime in before creating a pull request.
Label is not defined in
taxonomy_entity_infoentity keysI looked at the Drupal 7 version of
taxonomy_entity_infoand it defineslabelunderI opened an issue over in the 'Title' module where it wasn't checking whether that array key existed and @argiepiano suggested opening a core issue
Current code
in
core/modules/taxonomy/taxonomy.moduleSuggested Code
I don't fully understand what label is notating in this case, so I'll wait for someone else to chime in before creating a pull request.