Commit ccab7562 authored by artis.bajars's avatar artis.bajars Committed by Mingsong
Browse files

Issue #3278219: Term overview for submit does not account for bundle settings

parent 5aa230e0
Loading
Loading
Loading
Loading
+5
Changes for src/Form/HmOverviewTerms.php: 5 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -96,12 +96,17 @@ class HmOverviewTerms extends OverviewTerms {
        // If the taxonomy setup plugin is enabled,
        // override the submitForm function.
        if (!empty($allowed_setup_plugins['hm_setup_taxonomy'])) {
          $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;
          }
        }
      }
    }

    // The taxonomy setup plugin is not enabled.
    // Let the submitForm function from core handle this request.