From 0ce3e85d63b1d64a759a6b76c767535263ffc297 Mon Sep 17 00:00:00 2001 From: Andrii Podanenko Date: Mon, 18 Jan 2016 17:23:39 +0200 Subject: [PATCH 1/2] Fix removed redirects If module been used for embeding forms, redirect exception can't be executed. This patch is a fix for that --- src/Plugin/Filter/EntityEmbedFilter.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Plugin/Filter/EntityEmbedFilter.php b/src/Plugin/Filter/EntityEmbedFilter.php index 01b4d731..ac9c3d65 100644 --- a/src/Plugin/Filter/EntityEmbedFilter.php +++ b/src/Plugin/Filter/EntityEmbedFilter.php @@ -117,6 +117,9 @@ public function process($text, $langcode) { } } catch(\Exception $e) { + if ($e instanceof \Drupal\Core\Form\EnforcedResponseException) { + throw $e; + } watchdog_exception('entity_embed', $e); } From 1d578acd9bb7e125557af3f0a01045479e42e7ea Mon Sep 17 00:00:00 2001 From: Andrii Podanenko Date: Tue, 19 Jan 2016 13:23:40 +0200 Subject: [PATCH 2/2] Review fix --- src/Plugin/Filter/EntityEmbedFilter.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Plugin/Filter/EntityEmbedFilter.php b/src/Plugin/Filter/EntityEmbedFilter.php index ac9c3d65..adaf0ece 100644 --- a/src/Plugin/Filter/EntityEmbedFilter.php +++ b/src/Plugin/Filter/EntityEmbedFilter.php @@ -116,10 +116,10 @@ public function process($text, $langcode) { throw new EntityNotFoundException(sprintf('Unable to load embedded %s entity %s.', $entity_type, $id)); } } + catch(\Drupal\Core\Form\EnforcedResponseException $e) { + throw $e; + } catch(\Exception $e) { - if ($e instanceof \Drupal\Core\Form\EnforcedResponseException) { - throw $e; - } watchdog_exception('entity_embed', $e); }