Skip to content

Commit

Permalink
Fix redirect and return
Browse files Browse the repository at this point in the history
  • Loading branch information
bencroker committed Apr 1, 2024
1 parent b0cf993 commit 85e0022
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
3 changes: 2 additions & 1 deletion src/elements/SendoutElement.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 85e0022

Please sign in to comment.