From ccab7562ac98477eda37132366f88233c20062bb Mon Sep 17 00:00:00 2001
From: "artis.bajars" <artis.bajars@320715.no-reply.drupal.org>
Date: Wed, 4 May 2022 01:38:48 +0000
Subject: [PATCH] Issue #3278219: Term overview for submit does not account for
 bundle settings

---
 src/Form/HmOverviewTerms.php | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/Form/HmOverviewTerms.php b/src/Form/HmOverviewTerms.php
index 3c7bc87..d66d383 100644
--- a/src/Form/HmOverviewTerms.php
+++ b/src/Form/HmOverviewTerms.php
@@ -96,9 +96,14 @@ class HmOverviewTerms extends OverviewTerms {
         // If the taxonomy setup plugin is enabled,
         // override the submitForm function.
         if (!empty($allowed_setup_plugins['hm_setup_taxonomy'])) {
-          // We don't need to do anything here,
-          // as the taxonomy plugin take it over.
-          return;
+          $plugin_settings = $config->get('setup_plugin_settings');
+          $enabled_bundles = array_keys(array_filter($plugin_settings['hm_setup_taxonomy']['bundle']));
+          $vocabulary = $form_state->get(['taxonomy', 'vocabulary']);
+          if (in_array($vocabulary->id(), $enabled_bundles)) {
+            // We don't need to do anything here,
+            // as the taxonomy plugin take it over.
+            return;
+          }
         }
       }
     }
-- 
GitLab