- 🇦🇺Australia silverham
I just wanted to mention, since this result shows up in internet search engines that if you experience the same error:
`Warning: Undefined array key "name" in template_preprocess_taxonomy_term()`
Then it could because one of your modules sets the `name` to be configurable in `manage display` but it is hidden. This is not a problem because an associated setting of `enable_base_field_custom_preprocess_skipping` per entity type should be set, then `name` processing is skipped but it is not set.
Example code of what should be set:
/** * Implements hook_entity_base_field_info_alter(). * * NOTE: If title is hidden, then `enable_base_field_custom_preprocess_skipping` * must be set to true in hook_entity_type_build(). */ function MODULE_NAME_entity_base_field_info_alter(&$fields, $entity_type) { if ($entity_type->id() == 'taxonomy_term') { if (isset($fields['name'])) { $fields['name']->setDisplayConfigurable('view', TRUE); } } } /** * Implements hook_entity_type_build(). * * If `enable_base_field_custom_preprocess_skipping` is set to true, then the * the name on the entity type e.g. taxonomy term's must be set to * `$fields['name']->setDisplayConfigurable('view', TRUE);` else name won't * show, if it's hidden. * * @see template_preprocess_taxonomy_term() in core taxonomy module. */ function MODULE_NAME_entity_type_build(array &$entity_types) { if (isset($entity_types['taxonomy_term'])) { $entity_types['taxonomy_term']->set('enable_base_field_custom_preprocess_skipping', TRUE); } }
@see also https://git.drupalcode.org/project/manage_display/-/blob/3.x/manage_disp...