diff --git a/core/modules/forum/forum.admin.inc b/core/modules/forum/forum.admin.inc index 559749b..4d33813 100644 --- a/core/modules/forum/forum.admin.inc +++ b/core/modules/forum/forum.admin.inc @@ -52,11 +52,7 @@ function forum_form_forum($form, &$form_state, Term $term) { '#description' => t('Short but meaningful name for this collection of threaded discussions.'), '#required' => TRUE, ); - $form['description'] = array('#type' => 'textarea', - '#title' => t('Description'), - '#default_value' => $term->description->value, - '#description' => t('Description and guidelines for discussions within this forum.'), - ); + $form['parent']['#tree'] = TRUE; $form['parent'][0] = _forum_parent_select($term->id(), t('Parent'), 'forum'); $form['weight'] = array('#type' => 'weight', @@ -159,13 +155,6 @@ function forum_form_container($form, &$form_state, Term $term) { '#description' => t('Short but meaningful name for this collection of related forums.'), '#required' => TRUE ); - - $form['description'] = array( - '#type' => 'textarea', - '#title' => t('Description'), - '#default_value' => $term->description->value, - '#description' => t('Description and guidelines for forums within this container.') - ); $form['parent']['#tree'] = TRUE; $form['parent'][0] = _forum_parent_select($term->id(), t('Parent'), 'container'); $form['weight'] = array( diff --git a/core/modules/forum/forum.module b/core/modules/forum/forum.module index af1330e..3cf03ef 100644 --- a/core/modules/forum/forum.module +++ b/core/modules/forum/forum.module @@ -1055,7 +1055,6 @@ function template_preprocess_forum_list(&$variables) { $row = 0; // Sanitize each forum so that the template can safely print the data. foreach ($variables['forums'] as $id => $forum) { - $variables['forums'][$id]->description = filter_xss_admin($forum->description->value); $variables['forums'][$id]->link = url("forum/" . $forum->id()); $variables['forums'][$id]->name = check_plain($forum->label()); $variables['forums'][$id]->is_container = !empty($forum->container); diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/TaxonomyUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/TaxonomyUpgradePathTest.php index 3700212..ebe8ac8 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/TaxonomyUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/TaxonomyUpgradePathTest.php @@ -10,9 +10,9 @@ /** * Tests upgrading a bare database with user role data. * - * Loads a bare installation of Drupal 7 with role data and runs the - * upgrade process on it. Tests for the conversion of serial role IDs to role - * machine names. + * Loads a standard installation of Drupal 7 with taxonomy data and runs the + * upgrade process on it. Tests for the conversion taxonomy vocabularies and + * term description field. */ class TaxonomyUpgradePathTest extends UpgradePathTestBase { public static function getInfo() { diff --git a/core/modules/system/tests/upgrade/drupal-7.taxonomy.database.php b/core/modules/system/tests/upgrade/drupal-7.taxonomy.database.php index d3dcb3f..e22261c 100644 --- a/core/modules/system/tests/upgrade/drupal-7.taxonomy.database.php +++ b/core/modules/system/tests/upgrade/drupal-7.taxonomy.database.php @@ -2,7 +2,8 @@ /** * @file - * Database additions for role tests. Used in upgrade.roles.test. + * Database additions for taxonomy tests. Used in + * \Drupal\system\Tests\Upgrade\TaxonomyUpgradePathTest. * * This dump only contains data and schema components relevant for taxonomy * functionality. The drupal-7.standard-all.database.php file is imported diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php index 55c3e07..f45c48f 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php @@ -78,20 +78,6 @@ class Term extends EntityNG implements TermInterface { public $name; /** - * Description of the term. - * - * @var \Drupal\Core\Entity\Field\FieldInterface - */ - public $description; - - /** - * The text format name for the term's description. - * - * @var \Drupal\Core\Entity\Field\FieldInterface - */ - public $format; - - /** * The weight of this term. * * This property stores the weight of this term in relation to other terms of @@ -143,7 +129,6 @@ protected function init() { unset($this->name); unset($this->weight); unset($this->format); - unset($this->description); unset($this->parent); } } diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermRenderController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermRenderController.php index 4b6c60f..affb41c 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermRenderController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermRenderController.php @@ -17,25 +17,6 @@ class TermRenderController extends EntityRenderController { /** - * Overrides Drupal\Core\Entity\EntityRenderController::buildContent(). - */ - public function buildContent(array $entities, array $displays, $view_mode, $langcode = NULL) { - parent::buildContent($entities, $displays, $view_mode, $langcode); - - foreach ($entities as $entity) { - // Add the description if enabled. - $display = $displays[$entity->bundle()]; - if (!empty($entity->description->value) && $display->getComponent('description')) { - $entity->content['description'] = array( - '#markup' => check_markup($entity->description->value, $entity->format->value, '', TRUE), - '#prefix' => '
', - '#suffix' => '
', - ); - } - } - } - - /** * Overrides \Drupal\Core\Entity\EntityRenderController::getBuildDefaults(). */ protected function getBuildDefaults(EntityInterface $entity, $view_mode, $langcode) { diff --git a/core/modules/taxonomy/taxonomy.install b/core/modules/taxonomy/taxonomy.install index f798b93..fa3e50a 100644 --- a/core/modules/taxonomy/taxonomy.install +++ b/core/modules/taxonomy/taxonomy.install @@ -429,3 +429,14 @@ function taxonomy_update_8009() { db_drop_field('taxonomy_term_data', 'description'); db_drop_field('taxonomy_term_data', 'format'); } + +/** + * Implements hook_update_dependencies(). + */ +function taxonomy_update_dependencies() { + // Convert term description to a field before fields are convert to config. + $dependencies['field'][8003] = array( + 'taxonomy' => 8009, + ); + return $dependencies; +}