diff --git a/src/Controller/MercuryEditorHtmlEntityFormController.php b/src/Controller/MercuryEditorHtmlEntityFormController.php index 05c66dda047d855a8082cc586ec2a32051f9e7d2..67b4fe868458d75b9562841f7096d31cdb81d6ec 100644 --- a/src/Controller/MercuryEditorHtmlEntityFormController.php +++ b/src/Controller/MercuryEditorHtmlEntityFormController.php @@ -78,14 +78,15 @@ class MercuryEditorHtmlEntityFormController extends FormController { // If entity type / bundle is ME enabled: if (isset($bundles[$entity_type_id][$bundle_id])) { $this->tempstore->set($entity); - $request->query->remove('destination'); $params = [ 'mercury_editor_entity' => $entity->uuid(), ]; + $query = $request->query->all(); + // Remove the destination parameter from the query to prevent + // the destination redirect from being triggered. + $request->query->remove('destination'); $options = [ - 'query' => [ - 'destination' => $request->get('destination'), - ], + 'query' => $query, ]; return new RedirectResponse(Url::fromRoute('mercury_editor.editor', $params, $options)->toString()); }