From 8d590856a86658280c00801a14109054bed5a8f0 Mon Sep 17 00:00:00 2001
From: Alex Pott <alex.a.pott@googlemail.com>
Date: Fri, 10 Oct 2014 12:42:17 +0100
Subject: [PATCH] Issue #2350997 by SchnWalter: Fixed Help module install error
 when Taxonomy is disabled because of Field UI.

---
 core/modules/field_ui/field_ui.module | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/core/modules/field_ui/field_ui.module b/core/modules/field_ui/field_ui.module
index 19a8f8ec74a3..246cf3b594d9 100644
--- a/core/modules/field_ui/field_ui.module
+++ b/core/modules/field_ui/field_ui.module
@@ -41,8 +41,10 @@ function field_ui_help($route_name, RouteMatchInterface $route_match) {
       $output .= '<dd>' . t('There are two main reasons for reusing fields. First, reusing fields can save you time over defining new fields. Second, reusing fields also allows you to display, filter, group, and sort content together by field across content types. For example, the contributed Views module allows you to create lists and tables of content. So if you use the same field on multiple content types, you can create a View containing all of those content types together displaying that field, sorted by that field, and/or filtered by that field.') . '</dd>';
       $output .= '<dt>' . t('Fields on content items') . '</dt>';
       $output .= '<dd>' . t('Fields on content items are defined at the content-type level, on the <em>Manage fields</em> tab of the content type edit page (which you can reach from the <a href="@types">Content types page</a>). When you define a field for a content type, each content item of that type will have that field added to it. Some fields, such as the Title and Body, are provided for you when you create a content type, or are provided on content types created by your installation profile.', array('@types' => \Drupal::url('node.overview_types'))) . '</dd>';
-      $output .= '<dt>' . t('Fields on taxonomy terms') . '</dt>';
-      $output .= '<dd>' . t('Fields on taxonomy terms are defined at the taxonomy vocabulary level, on the <em>Manage fields</em> tab of the vocabulary edit page (which you can reach from the <a href="@taxonomy">Taxonomy page</a>). When you define a field for a vocabulary, each term in that vocabulary will have that field added to it. For example, you could define an image field for a vocabulary to store an icon with each term.', array('@taxonomy' => \Drupal::url('taxonomy.vocabulary_list'))) . '</dd>';
+      if (\Drupal::moduleHandler()->moduleExists('taxonomy')) {
+        $output .= '<dt>' . t('Fields on taxonomy terms') . '</dt>';
+        $output .= '<dd>' . t('Fields on taxonomy terms are defined at the taxonomy vocabulary level, on the <em>Manage fields</em> tab of the vocabulary edit page (which you can reach from the <a href="@taxonomy">Taxonomy page</a>). When you define a field for a vocabulary, each term in that vocabulary will have that field added to it. For example, you could define an image field for a vocabulary to store an icon with each term.', array('@taxonomy' => \Drupal::url('taxonomy.vocabulary_list'))) . '</dd>';
+      }
       $output .= '<dt>' . t('Fields on user accounts') . '</dt>';
       $output .= '<dd>' . t('Fields on user accounts are defined on a site-wide basis on the <a href="@fields">Manage fields tab</a> of the <a href="@accounts">Account settings</a> page. When you define a field for user accounts, each user account will have that field added to it. For example, you could add a long text field to allow users to include a biography.', array('@fields' => \Drupal::url('field_ui.overview_user'), '@accounts' => \Drupal::url('entity.user.admin_form'))) . '</dd>';
       $output .= '<dt>' . t('Fields on comments') . '</dt>';
-- 
GitLab