diff --git a/core/modules/views/lib/Drupal/views/Tests/Taxonomy/TaxonomyFieldTest.php b/core/modules/views/lib/Drupal/views/Tests/Taxonomy/TaxonomyFieldTest.php
new file mode 100644
index 0000000..c61fac3
--- /dev/null
+++ b/core/modules/views/lib/Drupal/views/Tests/Taxonomy/TaxonomyFieldTest.php
@@ -0,0 +1,97 @@
+<?php
+
+/**
+ * @file
+ * Definition of Drupal\views\Tests\Taxonomy\TaxonomyFieldTest.
+ */
+
+namespace Drupal\views\Tests\Taxonomy;
+
+/**
+ * Tests the taxonomy field handler.
+ *
+ * @see \Views\taxonomy\Plugin\views\field\Taxonomy
+ */
+class TaxonomyFieldTest extends TaxonomyTestBase {
+
+  public static function getInfo() {
+    return array(
+      'name' => 'Taxonomy: Field',
+      'description' => 'Tests the taxonomy field handler.',
+      'group' => 'Views Modules',
+    );
+  }
+
+  /**
+   * Tests the handler.
+   */
+  public function testField() {
+    $view = views_get_view('test_taxonomy_field');
+    $this->executeView($view);
+    $output = $view->preview();
+
+    $uri = $this->term1->uri();
+    $label = $this->term1->label();
+    $this->assertTrue(strpos($output, $uri['path']) !== FALSE, 'The term link appears in the output.');
+    $this->assertTrue(strpos($output, $this->term1->label()) !== FALSE, 'The term label appears in the output.');
+
+    $view->destroy();
+    $view->initHandlers();
+    // Disable the link
+    $view->field['name']->options['link_to_taxonomy'] = FALSE;
+    $this->executeView($view);
+    $output = $view->preview();
+
+    $this->assertFalse(strpos($output, $uri['path']) !== FALSE, 'The term link appears in the output.');
+    $this->assertTrue(strpos($output, $label) !== FALSE, 'The term label appears in the output.');
+
+    //Check one special case. View with active aggregation (field name).
+    $terms = $this->createTermMultiple();
+    $view = views_get_view('test_taxonomy_field_aggregation');
+    $this->executeView($view);
+    $output = $view->preview();
+
+    $uri1 = $terms[0]->uri();
+    $this->assertTrue(strpos($output, $uri1['path']) !== FALSE, 'The term 1 link appears in the output (with aggregation).');
+
+    $uri2 = $terms[1]->uri();
+    $this->assertTrue(strpos($output, $uri2['path']) !== FALSE, 'The term 2 link appears in the output (with aggregation).');
+
+    $view->destroy();
+    $view->storage->display['default']['display_options']['fields']['name']['link_to_taxonomy'] = FALSE;
+    $view->initHandlers();
+    // Disable the link.
+    $view->field['name']->options['link_to_taxonomy'] = FALSE;
+    $this->executeView($view);
+    $output = $view->preview();
+
+    //Check that terms[0] and term[1] is aggregated correctly and the count is 2.
+    $this->assertTrue(strpos($output, '<span class="field-content">2</span>') !== FALSE, "The field name with aggregation work fine"); 
+
+  }
+
+  /**
+   * Returns a multiple new terms (with the same name) with random properties in vocabulary $vid.
+   *
+   * @return array Drupal\taxonomy\Term
+   *   The array with created taxonomy terms.
+   */
+  protected function createTermMultiple() {
+    $data = 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' => $this->vocabulary->vid,
+      'langcode' => LANGUAGE_NOT_SPECIFIED,
+    );
+
+    $term1 = entity_create('taxonomy_term', $data);
+    $term1->save();
+    $term2 = entity_create('taxonomy_term', $data);
+    $term2->save();
+
+    return array($term1, $term2);
+  }
+
+}
diff --git a/core/modules/views/tests/views_test_config/config/views.view.test_taxonomy_field.yml b/core/modules/views/tests/views_test_config/config/views.view.test_taxonomy_field.yml
new file mode 100644
index 0000000..481018b
--- /dev/null
+++ b/core/modules/views/tests/views_test_config/config/views.view.test_taxonomy_field.yml
@@ -0,0 +1,52 @@
+base_table: taxonomy_term_data
+name: test_taxonomy_field
+description: ''
+tag: ''
+human_name: test_taxonomy_field
+core: 8.x
+api_version: '3.0'
+display:
+  default:
+    display_plugin: default
+    id: default
+    display_title: Master
+    position: ''
+    display_options:
+      access:
+        type: perm
+      cache:
+        type: none
+      query:
+        type: views_query
+      exposed_form:
+        type: basic
+      pager:
+        type: full
+      style:
+        type: default
+      row:
+        type: fields
+      fields:
+        name:
+          id: name
+          table: taxonomy_term_data
+          field: name
+          label: ''
+          alter:
+            alter_text: '0'
+            make_link: '0'
+            absolute: '0'
+            trim: '0'
+            word_boundary: '0'
+            ellipsis: '0'
+            strip_tags: '0'
+            html: '0'
+          hide_empty: '0'
+          empty_zero: '0'
+          link_to_taxonomy: '1'
+      filters: {  }
+      sorts: {  }
+base_field: tid
+disabled: '0'
+module: views
+langcode: und
diff --git a/core/modules/views/tests/views_test_config/config/views.view.test_taxonomy_field_aggregation.yml b/core/modules/views/tests/views_test_config/config/views.view.test_taxonomy_field_aggregation.yml
new file mode 100644
index 0000000..c453be6
--- /dev/null
+++ b/core/modules/views/tests/views_test_config/config/views.view.test_taxonomy_field_aggregation.yml
@@ -0,0 +1,164 @@
+base_table: taxonomy_term_data
+name: test_taxonomy_field_aggregation
+description: ''
+tag: ''
+human_name: test_taxonomy_field_aggregation
+core: 8.x
+api_version: '3.0'
+display:
+  default:
+    display_plugin: default
+    id: default
+    display_title: Master
+    position: ''
+    display_options:
+      access:
+        type: perm
+      cache:
+        type: none
+      query:
+        type: views_query
+      exposed_form:
+        type: basic
+      pager:
+        type: none
+        options:
+          items_per_page: '0'
+      style:
+        type: default
+        options:
+          grouping:
+            -
+              field: name
+              rendered: '1'
+              rendered_strip: '0'
+          row_class: ''
+          default_row_class: '1'
+          row_class_special: '1'
+      row:
+        type: fields
+      fields:
+        name:
+          id: name
+          table: taxonomy_term_data
+          field: name
+          relationship: none
+          group_type: group
+          admin_label: ''
+          label: ''
+          exclude: '0'
+          alter:
+            alter_text: '0'
+            text: ''
+            make_link: '0'
+            path: ''
+            absolute: '0'
+            external: '0'
+            replace_spaces: '0'
+            path_case: none
+            trim_whitespace: '0'
+            alt: ''
+            rel: ''
+            link_class: ''
+            prefix: ''
+            suffix: ''
+            target: ''
+            nl2br: '0'
+            max_length: ''
+            word_boundary: '0'
+            ellipsis: '0'
+            more_link: '0'
+            more_link_text: ''
+            more_link_path: ''
+            strip_tags: '0'
+            trim: '0'
+            preserve_tags: ''
+            html: '0'
+          element_type: ''
+          element_class: ''
+          element_label_type: ''
+          element_label_class: ''
+          element_label_colon: '0'
+          element_wrapper_type: ''
+          element_wrapper_class: ''
+          element_default_classes: '1'
+          empty: ''
+          hide_empty: '0'
+          empty_zero: '0'
+          hide_alter_empty: '1'
+          link_to_taxonomy: '1'
+          convert_spaces: '0'
+        name_1:
+          id: name_1
+          table: taxonomy_term_data
+          field: name
+          relationship: none
+          group_type: count
+          admin_label: ''
+          label: Total
+          exclude: '0'
+          alter:
+            alter_text: '0'
+            text: ''
+            make_link: '0'
+            path: ''
+            absolute: '0'
+            external: '0'
+            replace_spaces: '0'
+            path_case: none
+            trim_whitespace: '0'
+            alt: ''
+            rel: ''
+            link_class: ''
+            prefix: ''
+            suffix: ''
+            target: ''
+            nl2br: '0'
+            max_length: ''
+            word_boundary: '1'
+            ellipsis: '1'
+            more_link: '0'
+            more_link_text: ''
+            more_link_path: ''
+            strip_tags: '0'
+            trim: '0'
+            preserve_tags: ''
+            html: '0'
+          element_type: ''
+          element_class: ''
+          element_label_type: ''
+          element_label_class: ''
+          element_label_colon: '1'
+          element_wrapper_type: ''
+          element_wrapper_class: ''
+          element_default_classes: '1'
+          empty: ''
+          hide_empty: '0'
+          empty_zero: '0'
+          hide_alter_empty: '1'
+          set_precision: '0'
+          precision: '0'
+          decimal: .
+          separator: ','
+          format_plural: '0'
+          format_plural_singular: '1'
+          format_plural_plural: '@count'
+          prefix: ''
+          suffix: ''
+          link_to_taxonomy: '0'
+          convert_spaces: '0'
+      filters: {  }
+      sorts: {  }
+      title: test_taxonomy_field_aggregation
+      group_by: '1'
+  page_1:
+    display_plugin: page
+    id: page_1
+    display_title: Page
+    position: ''
+    display_options:
+      path: test-taxonomy-field-aggregation
+base_field: tid
+disabled: '0'
+module: views
+langcode: und
diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Taxonomy.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Taxonomy.php
index ec56116..7489ff9 100644
--- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Taxonomy.php
+++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/views/field/Taxonomy.php
@@ -35,12 +35,15 @@ class Taxonomy extends FieldPluginBase {
   public function init(ViewExecutable $view, &$options) {
     parent::init($view, $options);
 
-    $this->additional_fields['vid'] = 'vid';
-    $this->additional_fields['tid'] = 'tid';
-    $this->additional_fields['vocabulary_machine_name'] = array(
-      'table' => 'taxonomy_vocabulary',
-      'field' => 'machine_name',
-    );
+    if ($this->options['link_to_taxonomy']) {
+      $this->additional_fields['vid'] = 'vid';
+      $this->additional_fields['tid'] = 'tid';
+      $this->additional_fields['vocabulary_machine_name'] = array(
+        'table' => 'taxonomy_vocabulary',
+        'field' => 'machine_name',
+      );
+    }
+
   }
 
   protected function defineOptions() {
@@ -75,16 +78,18 @@ public function buildOptionsForm(&$form, &$form_state) {
    * Data should be made XSS safe prior to calling this function.
    */
   function render_link($data, $values) {
-    $tid = $this->get_value($values, 'tid');
-    if (!empty($this->options['link_to_taxonomy']) && !empty($tid) && $data !== NULL && $data !== '') {
-      $term = entity_create('taxonomy_term', array(
-        'tid' => $tid,
-        'vid' => $this->get_value($values, 'vid'),
-        'vocabulary_machine_name' => $values->{$this->aliases['vocabulary_machine_name']},
-      ));
-      $this->options['alter']['make_link'] = TRUE;
-      $uri = $term->uri();
-      $this->options['alter']['path'] = $uri['path'];
+    if (!empty($this->options['link_to_taxonomy'])) {
+      $tid = $this->get_value($values, 'tid');
+      if (!empty($tid) && $data !== NULL && $data !== '') {
+        $term = entity_create('taxonomy_term', array(
+          'tid' => $tid,
+          'vid' => $this->get_value($values, 'vid'),
+          'vocabulary_machine_name' => $values->{$this->aliases['vocabulary_machine_name']},
+        ));
+        $this->options['alter']['make_link'] = TRUE;
+        $uri = $term->uri();
+        $this->options['alter']['path'] = $uri['path'];
+      }
     }
 
     if (!empty($this->options['convert_spaces'])) {
