diff --git a/CHANGELOG.md b/CHANGELOG.md index 9b6cd91c..5e0c7f45 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ ### Fixed - Fixed the buttons to create new campaign types and mailing list types appearing when allow admin changes was disabled or the user did not have the necessary permissions. +- Fixed an error that could appear when clicking on a sent sendout as an impersonated user in Craft Cloud. ## 2.13.1 - 2024-03-26 diff --git a/src/elements/SendoutElement.php b/src/elements/SendoutElement.php index d78fb7be..565d0100 100755 --- a/src/elements/SendoutElement.php +++ b/src/elements/SendoutElement.php @@ -578,7 +578,8 @@ public function prepareEditScreen(Response $response, string $containerId): void // Only redirect if we're not already redirecting, to prevent an endless loop in Craft 4.0.4 and above. // https://github.com/putyourlightson/craft-campaign/issues/316 if (!$response->getIsRedirection()) { - $response->redirect($this->getCpPreviewUrl()); + $response->redirect($this->getCpPreviewUrl())->send(); + return; } }