diff --git a/core/modules/taxonomy/src/Entity/Term.php b/core/modules/taxonomy/src/Entity/Term.php index 7ca9dd7..d04e855 100644 --- a/core/modules/taxonomy/src/Entity/Term.php +++ b/core/modules/taxonomy/src/Entity/Term.php @@ -148,21 +148,24 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) { )) ->setDisplayConfigurable('form', TRUE); - $fields['description'] = BaseFieldDefinition::create('text_long') - ->setLabel(t('Description')) - ->setDescription(t('A description of the term.')) - ->setTranslatable(TRUE) - ->setDisplayOptions('view', array( - 'label' => 'hidden', - 'type' => 'text_default', - 'weight' => 0, - )) - ->setDisplayConfigurable('view', TRUE) - ->setDisplayOptions('form', array( - 'type' => 'text_textfield', - 'weight' => 0, - )) - ->setDisplayConfigurable('form', TRUE); + $storage_definitions = \Drupal::entityManager()->getLastInstalledFieldStorageDefinitions('taxonomy_term'); + if (isset($storage_definitions['description'])) { + $fields['description'] = BaseFieldDefinition::create('text_long') + ->setLabel(t('Description')) + ->setDescription(t('A description of the term.')) + ->setTranslatable(TRUE) + ->setDisplayOptions('view', array( + 'label' => 'hidden', + 'type' => 'text_default', + 'weight' => 0, + )) + ->setDisplayConfigurable('view', TRUE) + ->setDisplayOptions('form', array( + 'type' => 'text_textfield', + 'weight' => 0, + )) + ->setDisplayConfigurable('form', TRUE); + } $fields['weight'] = BaseFieldDefinition::create('integer') ->setLabel(t('Weight'))