diff --git a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php index f56cfbb..e6bab38 100644 --- a/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php +++ b/core/modules/forum/lib/Drupal/forum/Tests/ForumTest.php @@ -325,13 +325,11 @@ function editForumTaxonomy() { $vid = config('forum.settings')->get('vocabulary'); $original_settings = taxonomy_vocabulary_load($vid); - // Generate a random name/description. + // Generate a random name. $title = $this->randomName(10); - $description = $this->randomName(100); $edit = array( 'name' => $title, - 'description' => $description, 'machine_name' => drupal_strtolower(drupal_substr($this->randomName(), 3, 9)), ); @@ -346,7 +344,6 @@ function editForumTaxonomy() { // Make sure we actually edited the vocabulary properly. $this->assertEqual($current_settings->name, $title, 'The name was updated'); - $this->assertEqual($current_settings->description, $description, 'The description was updated'); // Restore the original vocabulary. taxonomy_vocabulary_save($original_settings); @@ -367,13 +364,11 @@ function editForumTaxonomy() { * The created taxonomy term data. */ function createForum($type, $parent = 0) { - // Generate a random name/description. + // Generate a random name. $name = $this->randomName(10); - $description = $this->randomName(100); $edit = array( 'name' => $name, - 'description' => $description, 'parent[0]' => $parent, 'weight' => '0', ); @@ -391,7 +386,7 @@ function createForum($type, $parent = 0) { ); // Verify forum. - $term = db_query("SELECT * FROM {taxonomy_term_data} t WHERE t.vid = :vid AND t.name = :name AND t.description = :desc", array(':vid' => config('forum.settings')->get('vocabulary'), ':name' => $name, ':desc' => $description))->fetchAssoc(); + $term = db_query("SELECT * FROM {taxonomy_term_data} t WHERE t.vid = :vid AND t.name = :name", array(':vid' => config('forum.settings')->get('vocabulary'), ':name' => $name))->fetchAssoc(); $this->assertTrue(!empty($term), 'The ' . $type . ' exists in the database'); // Verify forum hierarchy. diff --git a/core/modules/forum/templates/forum-list.tpl.php b/core/modules/forum/templates/forum-list.tpl.php index b169493..5242c8f 100644 --- a/core/modules/forum/templates/forum-list.tpl.php +++ b/core/modules/forum/templates/forum-list.tpl.php @@ -16,7 +16,6 @@ * - $forum->icon_title: Text alternative for the forum icon. * - $forum->name: The name of the forum. * - $forum->link: The URL to link to this forum. - * - $forum->description: The description of this forum. * - $forum->new_topics: TRUE if the forum contains unread posts. * - $forum->new_url: A URL to the forum's unread posts. * - $forum->new_text: Text for the above URL, which tells how many new posts. @@ -55,9 +54,6 @@ icon_title; ?>
label(); ?>
- description): ?> -
description; ?>
- ', $forum->depth); ?> is_container): ?> diff --git a/core/modules/path/lib/Drupal/path/Tests/PathTaxonomyTermTest.php b/core/modules/path/lib/Drupal/path/Tests/PathTaxonomyTermTest.php index 421870d..732f324 100644 --- a/core/modules/path/lib/Drupal/path/Tests/PathTaxonomyTermTest.php +++ b/core/modules/path/lib/Drupal/path/Tests/PathTaxonomyTermTest.php @@ -50,14 +50,14 @@ function testTermAlias() { $vocabulary = taxonomy_vocabulary_load(1); $description = $this->randomName();; $edit = array(); - $edit['name'] = $this->randomName(); - $edit['description[value]'] = $description; + $name = $this->randomName(); + $edit['name'] = $name; $edit['path[alias]'] = $this->randomName(); $this->drupalPost('admin/structure/taxonomy/' . $vocabulary->machine_name . '/add', $edit, t('Save')); // Confirm that the alias works. $this->drupalGet($edit['path[alias]']); - $this->assertText($description, 'Term can be accessed on URL alias.'); + $this->assertText($name, 'Term can be accessed on URL alias.'); // Change the term's URL alias. $tid = db_query("SELECT tid FROM {taxonomy_term_data} WHERE name = :name", array(':name' => $edit['name']))->fetchField(); @@ -67,11 +67,11 @@ function testTermAlias() { // Confirm that the changed alias works. $this->drupalGet($edit2['path[alias]']); - $this->assertText($description, 'Term can be accessed on changed URL alias.'); + $this->assertText($name, 'Term can be accessed on changed URL alias.'); // Confirm that the old alias no longer works. $this->drupalGet($edit['path[alias]']); - $this->assertNoText($description, 'Old URL alias has been removed after altering.'); + $this->assertNoText($name, 'Old URL alias has been removed after altering.'); $this->assertResponse(404, 'Old URL alias returns 404.'); // Remove the term's URL alias. @@ -81,7 +81,7 @@ function testTermAlias() { // Confirm that the alias no longer works. $this->drupalGet($edit2['path[alias]']); - $this->assertNoText($description, 'Old URL alias has been removed after altering.'); + $this->assertNoText($name, 'Old URL alias has been removed after altering.'); $this->assertResponse(404, 'Old URL alias returns 404.'); } } diff --git a/core/modules/system/lib/Drupal/system/Tests/Upgrade/TaxonomyUpgradePathTest.php b/core/modules/system/lib/Drupal/system/Tests/Upgrade/TaxonomyUpgradePathTest.php new file mode 100644 index 0000000..4308ee9 --- /dev/null +++ b/core/modules/system/lib/Drupal/system/Tests/Upgrade/TaxonomyUpgradePathTest.php @@ -0,0 +1,64 @@ + 'Taxonomy upgrade test', + 'description' => 'Upgrade tests for a Taxonomy Term data.', + 'group' => 'Upgrade path', + ); + } + + public function setUp() { + // Path to the database dump files. + $this->databaseDumpFiles = array( + drupal_get_path('module', 'system') . '/tests/upgrade/drupal-7.filled.standard_all.database.php.gz', + ); + parent::setUp(); + } + + /** + * Tests a successful point release update. + */ + public function testTaxonomyUpgrade() { + $this->assertTrue($this->performUpgrade(), 'The upgrade was completed successfully.'); + // Check if the field was created. + $field_info = field_info_field('taxonomy_term_description'); + $this->assertNotNull(field_info_field('taxonomy_term_description'), 'Field {taxonomy_term_description} was created'); + $select = db_select('taxonomy_term_data', 'ttd') + ->fields('ttd', array('tid')) + ->condition('ttd.tid', 1, '>') + ->orderBy('ttd.tid', 'ASC'); + $tids = $select->execute()->fetchCol(); + $taxonomy_terms = taxonomy_term_load_multiple($tids); + foreach ($taxonomy_terms as $taxonomy_term) { + if (empty($taxonomy_term)) { + $this->assert(FALSE, "Taxonomy term $tid not found."); + } + else { + $description = field_get_items('taxonomy_term', $taxonomy_term, 'taxonomy_term_description'); + if (empty($description)) { + $this->assert(FALSE, "Description found for taxonomy term {$taxonomy_term->tid}."); + } + else { + $this->assert(TRUE, "Description found for taxonomy term {$taxonomy_term->tid}."); + } + } + } + } +} diff --git a/core/modules/system/tests/upgrade/drupal-7.filled.standard_all.database.php.gz b/core/modules/system/tests/upgrade/drupal-7.filled.standard_all.database.php.gz index 05f47a4..5343fa0 100644 --- a/core/modules/system/tests/upgrade/drupal-7.filled.standard_all.database.php.gz +++ b/core/modules/system/tests/upgrade/drupal-7.filled.standard_all.database.php.gz @@ -1,4 +1,4 @@ -NKPdrupal-7.filled.standard_all.database.php{o67~ +Pdrupal-7.filled.standard_all.database.php{o67~ bowكd7$r֎ZHj{/PEԅ"fxlX_Ūb/awӟ.<~x[ 7Љo (vR/I1>D|g_伸^eNq8ߺ&Cs( h!|a^t8ЛOo0فQD/}=^s!6ݧ{r(.+_(o&Aݐyӣd[7=Dn&{}ɫϠ R/ ٯ|:gfxFۼ4<7F/]I׳kMwxxn&(N7Ǽ{?D]^$ɿ&Ё?Ro0 xps|(񟞊0cR8N[܋?ixh D xn6^{Ʊşbi- Aoe4}=x5a߾5_% {p}>;T94}lGu_O4:Z?~ 7ʇq ;$ }1,!cOL u(xs:AOc|>?,d Kb*į'9-aK~ՉG8᱄SeR&X9zWyDB͂ŲxW9/bNhb24g7P4Ժppc"I L=4h1oTT>x]%gEDAr$@i /QE)G0%Cx7tg78zסdp|n@|lUn j yG rKv0]-}_Ʈ~O3`}ОQMszKoy7'`UMկu @@ -328,74 +328,91 @@ qCL %Wʗ'Ź]bďֈelzmw7-cSklhFB_ ޛdB}E\6M+d &R'Zjq*ynΫ!'Lذv%my&~e6s6y~E T gEI3:5`7dL\^V~l].^]bA*ZmQiq_gk L?ux`Ir6*+{0iOz|w=귟GJZf1":uJ>`u`ߞ˳hN,T lUhnh-y7 4M=c?k߿SlA pϻ8);rDBڭ-f,*!J_ӏXsFAFru K[g{hf0_X/j 3[}>vpͦ)g ZbHF*퇩_>|,Ԍk6Vsfp9~$\Ct9/ˬ". ?mT>r`|oܜK(0#ARddxNj}Es$Ӷ5o8ѭ=rف0wzs~z9R^:5:NP`DF02RU)vN/DzCu_7[jS6cp XRܿi76M~!Zl@ LQqR@'`/*.6;$h Fvll+PAjp<ծ18 U{? >%V4V$ -YIQrmX h?P\}f`tl:|gЇ]th`U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H=: \ No newline at end of file diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php index f81b9e5..d1669e6 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/TermFormController.php @@ -34,13 +34,6 @@ public function form(array $form, array &$form_state, EntityInterface $term) { '#weight' => -5, ); - $form['description'] = array( - '#type' => 'text_format', - '#title' => t('Description'), - '#default_value' => $term->description, - '#format' => $term->format, - '#weight' => 0, - ); $language_configuration = module_invoke('language', 'get_default_configuration', 'taxonomy_term', $vocabulary->machine_name); $form['langcode'] = array( '#type' => 'language_select', @@ -144,11 +137,6 @@ public function submit(array $form, array &$form_state) { // Prevent leading and trailing spaces in term names. $term->name = trim($term->name); - // Convert text_format field into values expected by taxonomy_term_save(). - $description = $form_state['values']['description']; - $term->description = $description['value']; - $term->format = $description['format']; - return $term; } diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTestBase.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTestBase.php index 6f4dcb2..0d5eec3 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTestBase.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TaxonomyTestBase.php @@ -54,9 +54,6 @@ function createVocabulary() { function createTerm($vocabulary) { $term = entity_create('taxonomy_term', array( 'name' => $this->randomName(), - 'description' => $this->randomName(), - // Use the first available text format. - 'format' => db_query_range('SELECT format FROM {filter_format}', 0, 1)->fetchField(), 'vid' => $vocabulary->vid, 'langcode' => LANGUAGE_NOT_SPECIFIED, )); diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php index b2603d6..f3211f5 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TermTest.php @@ -280,7 +280,6 @@ function testTermAutocompletion() { function testTermInterface() { $edit = array( 'name' => $this->randomName(12), - 'description[value]' => $this->randomName(100), ); // Explicitly set the parents field to 'root', to ensure that // TermFormController::save() handles the invalid term ID correctly. @@ -302,11 +301,9 @@ function testTermInterface() { $this->clickLink(t('edit')); $this->assertRaw($edit['name'], 'The randomly generated term name is present.'); - $this->assertText($edit['description[value]'], 'The randomly generated term description is present.'); $edit = array( 'name' => $this->randomName(14), - 'description[value]' => $this->randomName(102), ); // Edit the term. @@ -320,15 +317,6 @@ function testTermInterface() { // View the term and check that it is correct. $this->drupalGet('taxonomy/term/' . $term->tid); $this->assertText($edit['name'], 'The randomly generated term name is present.'); - $this->assertText($edit['description[value]'], 'The randomly generated term description is present.'); - - // Did this page request display a 'term-listing-heading'? - $this->assertPattern('|class="taxonomy-term-description"|', 'Term page displayed the term description element.'); - // Check that it does NOT show a description when description is blank. - $term->description = ''; - taxonomy_term_save($term); - $this->drupalGet('taxonomy/term/' . $term->tid); - $this->assertNoPattern('|class="taxonomy-term-description"|', 'Term page did not display the term description when description was blank.'); // Check that the term feed page is working. $this->drupalGet('taxonomy/term/' . $term->tid . '/feed'); @@ -415,7 +403,6 @@ function testTermMultipleParentsInterface() { // Add a new term with multiple parents. $edit = array( 'name' => $this->randomName(12), - 'description[value]' => $this->randomName(100), 'parent[]' => array(0, $parent->tid), ); // Save the new term. @@ -426,7 +413,6 @@ function testTermMultipleParentsInterface() { $term = reset($terms); $this->assertNotNull($term, 'Term found in database.'); $this->assertEqual($edit['name'], $term->name, 'Term name was successfully saved.'); - $this->assertEqual($edit['description[value]'], $term->description, 'Term description was successfully saved.'); // Check that the parent tid is still there. The other parent () is // not added by taxonomy_term_load_parents(). $parents = taxonomy_term_load_parents($term->tid); diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php index e273c1b..168cf0d 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Tests/TokenReplaceTest.php @@ -84,7 +84,6 @@ function testTaxonomyTokenReplacement() { $tests = array(); $tests['[term:tid]'] = $term1->tid; $tests['[term:name]'] = check_plain($term1->name); - $tests['[term:description]'] = check_markup($term1->description, $term1->format); $tests['[term:url]'] = url('taxonomy/term/' . $term1->tid, array('absolute' => TRUE)); $tests['[term:node-count]'] = 0; $tests['[term:parent:name]'] = '[term:parent:name]'; @@ -99,7 +98,6 @@ function testTaxonomyTokenReplacement() { $tests = array(); $tests['[term:tid]'] = $term2->tid; $tests['[term:name]'] = check_plain($term2->name); - $tests['[term:description]'] = check_markup($term2->description, $term2->format); $tests['[term:url]'] = url('taxonomy/term/' . $term2->tid, array('absolute' => TRUE)); $tests['[term:node-count]'] = 1; $tests['[term:parent:name]'] = check_plain($term1->name); @@ -117,7 +115,6 @@ function testTaxonomyTokenReplacement() { // Generate and test unsanitized tokens. $tests['[term:name]'] = $term2->name; - $tests['[term:description]'] = $term2->description; $tests['[term:parent:name]'] = $term1->name; $tests['[term:vocabulary:name]'] = $this->vocabulary->name; diff --git a/core/modules/taxonomy/taxonomy.css b/core/modules/taxonomy/taxonomy.css index 1f80d52..543666a 100644 --- a/core/modules/taxonomy/taxonomy.css +++ b/core/modules/taxonomy/taxonomy.css @@ -8,6 +8,3 @@ .taxonomy-term-divider-bottom { border-top: 1px dotted #ccc; } -.taxonomy-term-description { - margin: 5px 0 20px; -} diff --git a/core/modules/taxonomy/taxonomy.install b/core/modules/taxonomy/taxonomy.install index 25d2c06..1a41088 100644 --- a/core/modules/taxonomy/taxonomy.install +++ b/core/modules/taxonomy/taxonomy.install @@ -122,19 +122,6 @@ function taxonomy_schema() { 'description' => 'The term name.', 'translatable' => TRUE, ), - 'description' => array( - 'type' => 'text', - 'not null' => FALSE, - 'size' => 'big', - 'description' => 'A description of the term.', - 'translatable' => TRUE, - ), - 'format' => array( - 'type' => 'varchar', - 'length' => 255, - 'not null' => FALSE, - 'description' => 'The {filter_format}.format of the description.', - ), 'weight' => array( 'type' => 'int', 'not null' => TRUE, @@ -349,3 +336,93 @@ function taxonomy_update_8003(&$sandbox) { $sandbox['#finished'] = empty($sandbox['max']) ? 1 : ($sandbox['progress'] / $sandbox['max']); } + +/** + * Create new field for term descriptions. + */ +function taxonomy_update_8004() { + $vocabularies = db_query("SELECT machine_name FROM {taxonomy_vocabulary}")->fetchCol(); + if (count($vocabularies)) { + // Create a new term description field. + $field = array( + 'field_name' => 'taxonomy_term_description', + 'module' => 'text', + 'type' => 'text_long', + 'cardinality' => 1, + 'locked' => FALSE, + 'storage' => array( + 'type' => 'field_sql_storage', + 'settings' => array(), + ), + ); + _update_7000_field_create_field($field); + + // Create instances for existing vocabularies. + foreach ($vocabularies as $vocabulary) { + // Attaches the description field to each bundle. + $instance = array( + 'field_name' => 'taxonomy_term_description', + 'label' => 'Description', + 'description' => '', + 'entity_type' => 'taxonomy_term', + '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_7000_field_create_instance($field, $instance); + } + } +} + +/** + * Move term descriptions in {term_data}.description into new field. + */ +function taxonomy_update_8005(&$sandbox) { + if (!isset($sandbox['progress'])) { + $sandbox['progress'] = 0; + $sandbox['current_tid'] = 0; + $sandbox['max'] = db_query('SELECT COUNT(DISTINCT tid) FROM {taxonomy_term_data} WHERE vid > 0')->fetchField(); + } + + $terms = db_query_range('SELECT t.tid, t.description, t.format, v.machine_name FROM {taxonomy_term_data} t INNER JOIN {taxonomy_vocabulary} v ON t.vid = v.vid WHERE tid > :tid ORDER BY tid ASC', 0, 100, array(':tid' => $sandbox['current_tid'])); + + foreach ($terms as $term) { + db_insert('field_data_taxonomy_term_description') + ->fields(array( + 'entity_type' => 'taxonomy_term', + 'bundle' => $term->machine_name, + 'entity_id' => $term->tid, + 'revision_id' => $term->tid, + 'langcode' => LANGUAGE_NOT_SPECIFIED, + 'delta' => 0, + 'taxonomy_term_description_value' => $term->description, + 'taxonomy_term_description_format' => $term->format, + )) + ->execute(); + $sandbox['progress']++; + $sandbox['current_tid'] = $term->tid; + } + + $sandbox['#finished'] = empty($sandbox['max']) ? 1 : ($sandbox['progress'] / $sandbox['max']); +} + +/** + * Remove {term_data}.description and {term_data}.format. + */ +function taxonomy_update_8006() { + db_drop_field('taxonomy_term_data', 'description'); + db_drop_field('taxonomy_term_data', 'format'); +} diff --git a/core/modules/taxonomy/taxonomy.module b/core/modules/taxonomy/taxonomy.module index 75573a9..5959ef2 100644 --- a/core/modules/taxonomy/taxonomy.module +++ b/core/modules/taxonomy/taxonomy.module @@ -145,18 +145,6 @@ function taxonomy_field_extra_fields() { 'description' => t('Term name textfield'), 'weight' => -5, ), - 'description' => array( - 'label' => t('Description'), - 'description' => t('Term description textarea'), - 'weight' => 0, - ), - ), - 'display' => array( - 'description' => array( - 'label' => t('Description'), - 'description' => t('Term description'), - 'weight' => 0, - ), ), ); } diff --git a/core/modules/taxonomy/taxonomy.pages.inc b/core/modules/taxonomy/taxonomy.pages.inc index 042263c..f1e6eb2 100644 --- a/core/modules/taxonomy/taxonomy.pages.inc +++ b/core/modules/taxonomy/taxonomy.pages.inc @@ -73,9 +73,6 @@ function taxonomy_term_page(Term $term) { function taxonomy_term_feed(Term $term) { $channel['link'] = url('taxonomy/term/' . $term->tid, array('absolute' => TRUE)); $channel['title'] = config('system.site')->get('name') . ' - ' . $term->label(); - // Only display the description if we have a single term, to avoid clutter and confusion. - // HTML will be removed from feed description. - $channel['description'] = check_markup($term->description, $term->format, '', TRUE); $nids = taxonomy_select_nodes($term->tid, FALSE, config('system.rss')->get('items.limit')); return node_feed($nids, $channel); diff --git a/core/modules/taxonomy/taxonomy.tokens.inc b/core/modules/taxonomy/taxonomy.tokens.inc index c7847b3..22a44b6 100644 --- a/core/modules/taxonomy/taxonomy.tokens.inc +++ b/core/modules/taxonomy/taxonomy.tokens.inc @@ -29,10 +29,6 @@ function taxonomy_token_info() { 'name' => t("Name"), 'description' => t("The name of the taxonomy term."), ); - $term['description'] = array( - 'name' => t("Description"), - 'description' => t("The optional description of the taxonomy term."), - ); $term['node-count'] = array( 'name' => t("Node count"), 'description' => t("The number of nodes tagged with the taxonomy term."), @@ -105,10 +101,6 @@ function taxonomy_tokens($type, $tokens, array $data = array(), array $options = $replacements[$original] = $sanitize ? check_plain($term->name) : $term->name; break; - case 'description': - $replacements[$original] = $sanitize ? check_markup($term->description, $term->format, '', TRUE) : $term->description; - break; - case 'url': $uri = $term->uri(); $replacements[$original] = url($uri['path'], array_merge($uri['options'], array('absolute' => TRUE))); diff --git a/core/modules/taxonomy/taxonomy.views.inc b/core/modules/taxonomy/taxonomy.views.inc index 57ef50c..fc9068c 100644 --- a/core/modules/taxonomy/taxonomy.views.inc +++ b/core/modules/taxonomy/taxonomy.views.inc @@ -213,19 +213,6 @@ function taxonomy_views_data() { ), ); - // Term description - $data['taxonomy_term_data']['description'] = array( - 'title' => t('Term description'), - 'help' => t('The description associated with a taxonomy term.'), - 'field' => array( - 'id' => 'markup', - 'format' => array('field' => 'format'), - ), - 'filter' => array( - 'id' => 'string', - ), - ); - // Term vocabulary $data['taxonomy_term_data']['vid'] = array( 'title' => t('Vocabulary'), diff --git a/core/modules/taxonomy/templates/taxonomy-term.tpl.php b/core/modules/taxonomy/templates/taxonomy-term.tpl.php index 712e83c..1687c6e 100644 --- a/core/modules/taxonomy/templates/taxonomy-term.tpl.php +++ b/core/modules/taxonomy/templates/taxonomy-term.tpl.php @@ -5,11 +5,10 @@ * Default theme implementation to display a term. * * Available variables: - * - $content: An array of items for the content of the term (fields and - * description). Use render($content) to print them all, or print a subset - * such as render($content['field_example']). Use - * hide($content['field_example']) to temporarily suppress the printing of a - * given element. + * - $content: An array of items for the content of the term (fields). Use + * render($content) to print them all, or print a subset such as + * render($content['field_example']). Use hide($content['field_example']) + * to temporarily suppress the printing of a given element. * - $url: Direct url of the current term. * - $label: Name of the current term. * - $attributes: An instance of Attributes class that can be manipulated as an diff --git a/core/profiles/standard/standard.install b/core/profiles/standard/standard.install index b4dc761..3df67d4 100644 --- a/core/profiles/standard/standard.install +++ b/core/profiles/standard/standard.install @@ -253,7 +253,7 @@ function standard_install() { $user_settings = config('user.settings'); $user_settings->set('register', USER_REGISTER_VISITORS_ADMINISTRATIVE_APPROVAL)->save(); - // Create a default vocabulary named "Tags", enabled for the 'article' content type. + // Create a default vocabulary named "Tags", enabled for the 'article' content type. Include a description field on terms for "Tags". $description = st('Use tags to group articles on similar topics into categories.'); $help = st('Enter a comma-separated list of words to describe your content.'); $vocabulary = entity_create('taxonomy_vocabulary', array( @@ -266,6 +266,29 @@ function standard_install() { taxonomy_vocabulary_save($vocabulary); $field = array( + 'field_name' => 'taxonomy_term_description', + 'type' => 'text_long', + 'entity_types' => array('taxonomy_term'), + ); + field_create_field($field); + + $instance = array( + 'field_name' => 'taxonomy_term_description', + 'label' => 'Description', + 'entity_type' => 'taxonomy_term', + 'bundle' => 'tags', + 'settings' => array('text_processing' => 1), + 'display' => array( + 'default' => array( + 'label' => 'hidden', + 'type' => 'text_default', + 'weight' => 0, + ), + ), + ); + field_create_instance($instance); + + $field = array( 'field_name' => 'field_' . $vocabulary->machine_name, 'type' => 'taxonomy_term_reference', // Set cardinality to unlimited for tagging. diff --git a/core/scripts/generate-d7-content.sh b/core/scripts/generate-d7-content.sh index acfc1a3..3957cdc 100644 --- a/core/scripts/generate-d7-content.sh +++ b/core/scripts/generate-d7-content.sh @@ -141,6 +141,7 @@ for ($j = 0; $j < $vocabulary->hierarchy + 1; $j++) { ++$term_id; $term = entity_create('taxonomy_term', array( + 'vid' => $voc_id, 'vocabulary_machine_name' => $vocabulary->machine_name, // For multiple parent vocabularies, omit the t0-t1 relation, otherwise // every parent in the vocabulary is a parent.