diff --git a/core/modules/contact/contact.install b/core/modules/contact/contact.install index cd60e7d..c3802e7 100644 --- a/core/modules/contact/contact.install +++ b/core/modules/contact/contact.install @@ -29,7 +29,7 @@ function contact_install() { function contact_update_dependencies() { // Migrate users.data after User module prepared the tables. $dependencies['contact'][8003] = array( - 'user' => 8016, + 'user' => 8011, ); return $dependencies; } 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 ebe8ac8..ae9d4ab 100644 --- a/core/modules/system/lib/Drupal/system/Tests/Upgrade/TaxonomyUpgradePathTest.php +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/TaxonomyUpgradePathTest.php @@ -8,7 +8,7 @@ namespace Drupal\system\Tests\Upgrade; /** - * Tests upgrading a bare database with user role data. + * Tests upgrading a bare database with taxonomy data. * * Loads a standard installation of Drupal 7 with taxonomy data and runs the * upgrade process on it. Tests for the conversion taxonomy vocabularies and @@ -32,9 +32,9 @@ public function setUp() { } /** - * Tests expected role ID conversions after a successful upgrade. + * Tests taxonomy description conversions after a successful upgrade. */ - public function testRoleUpgrade() { + public function testTaxonomyUpgrade() { $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.'); // Check the tags vocabulary. @@ -48,15 +48,15 @@ public function testRoleUpgrade() { $this->assertEqual($term1->label(), 'A tag'); $this->assertEqual($term1->vid->value, 'tags'); $this->assertEqual($term1->bundle(), 'tags'); - $this->assertEqual($term1->taxonomy_term_description->value, 'Description of a tag'); - $this->assertEqual($term1->taxonomy_term_description->format, 'plain_text'); + $this->assertEqual($term1->description->value, 'Description of a tag'); + $this->assertEqual($term1->description->format, 'plain_text'); $term2 = taxonomy_term_load(6); $this->assertEqual($term2->label(), 'Another tag'); $this->assertEqual($term2->vid->value, 'tags'); $this->assertEqual($term2->bundle(), 'tags'); - $this->assertEqual($term2->taxonomy_term_description->value, 'HTML Description'); - $this->assertEqual($term2->taxonomy_term_description->format, 'filtered_html'); + $this->assertEqual($term2->description->value, 'HTML Description'); + $this->assertEqual($term2->description->format, 'filtered_html'); } } diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php index 415aba0..9f3bbe9 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Entity/Term.php @@ -85,20 +85,6 @@ class Term extends ContentEntityBase implements TermInterface { public $name; /** - * Description of the term. - * - * @var \Drupal\Core\Field\FieldItemListInterface - */ - public $description; - - /** - * The text format name for the term's description. - * - * @var \Drupal\Core\Field\FieldItemListInterface - */ - public $format; - - /** * The weight of this term. * * This property stores the weight of this term in relation to other terms of @@ -228,17 +214,6 @@ public static function baseFieldDefinitions($entity_type) { 'description' => t('The term name.'), 'type' => 'string_field', ); - $properties['description'] = array( - 'label' => t('Description'), - 'description' => t('A description of the term'), - 'type' => 'string_field', - ); - // @todo Combine with description. - $properties['format'] = array( - 'label' => t('Description format'), - 'description' => t('The filter format ID of the description.'), - 'type' => 'string_field', - ); $properties['weight'] = array( 'label' => t('Weight'), 'description' => t('The weight of this term in relation to other terms.'), diff --git a/core/modules/taxonomy/taxonomy.install b/core/modules/taxonomy/taxonomy.install index 74a9126..af12894 100644 --- a/core/modules/taxonomy/taxonomy.install +++ b/core/modules/taxonomy/taxonomy.install @@ -194,16 +194,11 @@ function taxonomy_field_schema($field) { * Implements hook_update_dependencies(). */ function taxonomy_update_dependencies() { - // Convert the 'tid' column of the taxonomy reference field to 'target_id' // after the field tables have been reorganized. $dependencies['taxonomy'][8007] = array( 'field' => 8006, ); - // Convert term description to a field before fields are convert to config. - $dependencies['field'][8003] = array( - 'taxonomy' => 8011, - ); return $dependencies; } @@ -412,14 +407,32 @@ function taxonomy_update_8009() { if (count($vocabularies)) { // Create a new term description field. $field = array( - 'id' => 'taxonomy_term_description', + 'name' => 'description', + 'entity_type' => 'taxonomy_term', 'module' => 'text', 'type' => 'text_long', 'cardinality' => 1, 'locked' => FALSE, - 'storage' => array( - 'type' => 'field_sql_storage', - 'settings' => array(), + 'schema' => array( + 'columns' => array( + 'value' => array( + 'type' => 'text', + 'size' => 'big', + 'not null' => FALSE, + ), + 'format' => array( + 'type' => 'varchar', + 'length' => 255, + 'not null' => FALSE, + ), + ), + 'foreign keys' => array( + 'format' => array( + 'table' => 'filter_format', + 'columns' => array('format' => 'format'), + ), + ), + 'indexes' => array(), ), ); _update_8003_field_create_field($field); @@ -429,26 +442,13 @@ function taxonomy_update_8009() { $vocabulary = substr($vocabulary, drupal_strlen('taxonomy.vocabulary.')); // Attaches the description field to each bundle. $instance = array( - 'id' => 'taxonomy_term_description', 'label' => 'Description', 'description' => '', 'entity_type' => 'taxonomy_term', + 'name' => 'description', 'bundle' => $vocabulary, 'required' => FALSE, 'settings' => array('text_processing' => 1), - 'widget' => array( - 'type' => 'text_textarea', - 'module' => 'text', - 'settings' => array( - 'rows' => 5, - ), - ), - 'display' => array( - 'default' => array( - 'label' => 'hidden', - 'type' => 'text_default', - ), - ), ); _update_8003_field_create_instance($field, $instance); } @@ -467,30 +467,28 @@ function taxonomy_update_8010(&$sandbox) { $terms = db_query_range('SELECT t.tid, t.description, t.format, t.vid FROM {taxonomy_term_data} t WHERE tid > :tid ORDER BY tid ASC', 0, 100, array(':tid' => $sandbox['current_tid'])); - $data = db_insert('field_data_taxonomy_term_description') - ->fields(array('entity_type', 'bundle', 'entity_id', 'revision_id', 'langcode', 'delta', 'taxonomy_term_description_value', 'taxonomy_term_description_format')); - $revision = db_insert('field_revision_taxonomy_term_description') - ->fields(array('entity_type', 'bundle', 'entity_id', 'revision_id', 'langcode', 'delta', 'taxonomy_term_description_value', 'taxonomy_term_description_format')); + $data = db_insert('taxonomy_term__description') + ->fields(array('bundle', 'entity_id', 'revision_id', 'langcode', 'delta', 'description_value', 'description_format')); + $revision = db_insert('taxonomy_term_revision__description') + ->fields(array('bundle', 'entity_id', 'revision_id', 'langcode', 'delta', 'description_value', 'description_format')); foreach ($terms as $term) { $data->values(array( - 'entity_type' => 'taxonomy_term', 'bundle' => $term->vid, 'entity_id' => $term->tid, 'revision_id' => $term->tid, 'langcode' => Language::LANGCODE_NOT_SPECIFIED, 'delta' => 0, - 'taxonomy_term_description_value' => $term->description, - 'taxonomy_term_description_format' => $term->format, + 'description_value' => $term->description, + 'description_format' => $term->format, )); $revision->fields(array( - 'entity_type' => 'taxonomy_term', 'bundle' => $term->vid, 'entity_id' => $term->tid, 'revision_id' => $term->tid, 'langcode' => Language::LANGCODE_NOT_SPECIFIED, 'delta' => 0, - 'taxonomy_term_description_value' => $term->description, - 'taxonomy_term_description_format' => $term->format, + 'description_value' => $term->description, + 'description_format' => $term->format, )); $sandbox['progress']++; $sandbox['current_tid'] = $term->tid; diff --git a/core/modules/user/user.install b/core/modules/user/user.install index e127a83..0aa4d17 100644 --- a/core/modules/user/user.install +++ b/core/modules/user/user.install @@ -343,11 +343,6 @@ function user_update_dependencies() { $dependencies['user'][8011] = array( 'field' => 8006, ); - // Make sure that the uuid column is added to {file_managed} before the - // user picture default image is added. - $dependencies['user'][8011] = array( - 'system' => 8015, - ); return $dependencies; } diff --git a/core/profiles/standard/config/entity.form_display.taxonomy_term.tags.default.yml b/core/profiles/standard/config/entity.form_display.taxonomy_term.tags.default.yml new file mode 100644 index 0000000..2ff493b --- /dev/null +++ b/core/profiles/standard/config/entity.form_display.taxonomy_term.tags.default.yml @@ -0,0 +1,13 @@ +id: taxonomy_term.tags.default +uuid: db7383e4-7317-432c-a200-c5a87b55667b +targetEntityType: taxonomy_term +bundle: tags +mode: default +content: + description: + type: text_textarea + weight: 0 + settings: + rows: '5' + placeholder: '' +status: true diff --git a/core/profiles/standard/config/field.field.taxonomy_term.description.yml b/core/profiles/standard/config/field.field.taxonomy_term.description.yml new file mode 100644 index 0000000..51f5807 --- /dev/null +++ b/core/profiles/standard/config/field.field.taxonomy_term.description.yml @@ -0,0 +1,14 @@ +id: taxonomy_term.description +uuid: 132ab84f-764f-41ca-bc0c-12a16c85742a +status: true +langcode: en +name: description +entity_type: taxonomy_term +type: text_long +settings: { } +module: text +active: true +locked: false +cardinality: '1' +translatable: false +indexes: { } diff --git a/core/profiles/standard/config/field.field.taxonomy_term_description.yml b/core/profiles/standard/config/field.field.taxonomy_term_description.yml deleted file mode 100644 index 379861d..0000000 --- a/core/profiles/standard/config/field.field.taxonomy_term_description.yml +++ /dev/null @@ -1,19 +0,0 @@ -id: taxonomy_term.taxonomy_term_description -name: taxonomy_term_description -entity_type: taxonomy_term -type: text_long -module: text -active: '1' -settings: { } -storage: - type: field_sql_storage - settings: { } - module: field_sql_storage - active: '1' -locked: '0' -cardinality: '1' -translatable: '0' -entity_types: { } -indexes: { } -status: 1 -langcode: und diff --git a/core/profiles/standard/config/field.instance.taxonomy_term.tags.description.yml b/core/profiles/standard/config/field.instance.taxonomy_term.tags.description.yml new file mode 100644 index 0000000..48e3b1e --- /dev/null +++ b/core/profiles/standard/config/field.instance.taxonomy_term.tags.description.yml @@ -0,0 +1,15 @@ +id: taxonomy_term.tags.description +uuid: d371ade7-286e-4504-8500-ce084609168e +status: true +langcode: en +field_uuid: 132ab84f-764f-41ca-bc0c-12a16c85742a +entity_type: taxonomy_term +bundle: tags +label: Description +description: '' +required: 0 +default_value: { } +default_value_function: '' +settings: + text_processing: '1' +field_type: text_long diff --git a/core/profiles/standard/config/field.instance.taxonomy_term.tags.taxonomy_term_description.yml b/core/profiles/standard/config/field.instance.taxonomy_term.tags.taxonomy_term_description.yml deleted file mode 100644 index 94afbf0..0000000 --- a/core/profiles/standard/config/field.instance.taxonomy_term.tags.taxonomy_term_description.yml +++ /dev/null @@ -1,22 +0,0 @@ -id: taxonomy_term.tags.taxonomy_term_description -field_name: taxonomy_term_description -entity_type: taxonomy_term -bundle: tags -label: Description -description: '' -required: false -default_value: '' -default_value_function: '' -settings: - text_processing: '1' - user_register_form: '0' -widget: - weight: '-4' - type: text_textarea - settings: - rows: '5' - placeholder: '' - module: text -field_type: text_long -status: 1 -langcode: und