From e4846e42626473b886700b046e8aaf6bcdb8635f Mon Sep 17 00:00:00 2001
From: catch <catch@35733.no-reply.drupal.org>
Date: Fri, 1 Mar 2024 11:27:13 +0000
Subject: [PATCH] Issue #3416184 by amateescu: Content Moderation should only
 validate its own workflow type

---
 .../src/EventSubscriber/ConfigImportSubscriber.php             | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php b/core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php
index 930167f04f23..68eb18dbb8b3 100644
--- a/core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php
+++ b/core/modules/content_moderation/src/EventSubscriber/ConfigImportSubscriber.php
@@ -47,7 +47,8 @@ public function onConfigImporterValidate(ConfigImporterEvent $event) {
     foreach (['update', 'delete'] as $op) {
       $unprocessed_configurations = $event->getConfigImporter()->getUnprocessedConfiguration($op);
       foreach ($unprocessed_configurations as $unprocessed_configuration) {
-        if ($workflow = $this->getWorkflow($unprocessed_configuration)) {
+        if (($workflow = $this->getWorkflow($unprocessed_configuration))
+            && $workflow->getTypePlugin()->getPluginId() === 'content_moderation') {
           if ($op === 'update') {
             $original_workflow_config = $event->getConfigImporter()
               ->getStorageComparer()
-- 
GitLab