diff --git a/core/modules/taxonomy/config/schema/taxonomy.views.schema.yml b/core/modules/taxonomy/config/schema/taxonomy.views.schema.yml index d88e702..40b226a 100644 --- a/core/modules/taxonomy/config/schema/taxonomy.views.schema.yml +++ b/core/modules/taxonomy/config/schema/taxonomy.views.schema.yml @@ -165,11 +165,3 @@ views.relationship.node_term_data: sequence: type: string label: 'Vocabulary' - -views.field.term_name: - type: views.field.field - label: 'Term name' - mapping: - convert_spaces: - type: boolean - label: 'Convert spaces in term names to hyphens' diff --git a/core/modules/taxonomy/src/Plugin/views/field/TermName.php b/core/modules/taxonomy/src/Plugin/views/field/TermName.php index 4b01b65..c2eba0f 100644 --- a/core/modules/taxonomy/src/Plugin/views/field/TermName.php +++ b/core/modules/taxonomy/src/Plugin/views/field/TermName.php @@ -11,7 +11,7 @@ use Drupal\views\ResultRow; /** - * A field that displays the taxonomy term name. + * Displays taxonomy term names and allows converting spaces to hyphens. * * @ingroup views_field_handlers * diff --git a/core/modules/taxonomy/src/Tests/Views/TaxonomyViewsFieldAccessTest.php b/core/modules/taxonomy/src/Tests/Views/TaxonomyViewsFieldAccessTest.php index 5c725c0..c16b10a 100644 --- a/core/modules/taxonomy/src/Tests/Views/TaxonomyViewsFieldAccessTest.php +++ b/core/modules/taxonomy/src/Tests/Views/TaxonomyViewsFieldAccessTest.php @@ -63,6 +63,12 @@ public function testTermFields() { $this->assertFieldAccess('taxonomy_term', 'name', 'Majorly random'); $this->assertFieldAccess('taxonomy_term', 'name', 'Semi random'); $this->assertFieldAccess('taxonomy_term', 'name', 'Not really random'); + $this->assertFieldAccess('taxonomy_term', 'tid', $term1->id()); + $this->assertFieldAccess('taxonomy_term', 'tid', $term2->id()); + $this->assertFieldAccess('taxonomy_term', 'tid', $term3->id()); + $this->assertFieldAccess('taxonomy_term', 'uuid', $term1->uuid()); + $this->assertFieldAccess('taxonomy_term', 'uuid', $term2->uuid()); + $this->assertFieldAccess('taxonomy_term', 'uuid', $term3->uuid()); } } diff --git a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_groupwise_term.yml b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_groupwise_term.yml index 4156094..4c5e6b9 100644 --- a/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_groupwise_term.yml +++ b/core/modules/taxonomy/tests/modules/taxonomy_test_views/test_views/views.view.test_groupwise_term.yml @@ -31,6 +31,7 @@ display: type: string settings: link_to_entity: true + convert_to_spaces: false entity_type: taxonomy_term entity_field: name nid: diff --git a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_groupwise_term_ui.yml b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_groupwise_term_ui.yml index 1e09fe3..f2bc7b7 100644 --- a/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_groupwise_term_ui.yml +++ b/core/modules/views/tests/modules/views_test_config/test_views/views.view.test_groupwise_term_ui.yml @@ -31,6 +31,7 @@ display: type: string settings: link_to_entity: true + convert_to_spaces: false entity_type: taxonomy_term entity_field: name nid: