Skip to content

Commit

Permalink
1.24.4
Browse files Browse the repository at this point in the history
bencroker committed Sep 20, 2023

Verified

This commit was signed with the committer’s verified signature.
bencroker Ben Croker
1 parent adeb83d commit 9ecf757
Showing 3 changed files with 18 additions and 4 deletions.
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
# Release Notes for Campaign

## 1.24.3 - 2023-08-21
## 1.24.4 - 2023-09-20
### Fixed
- Fixed a bug in which the cached sendout element view was not invalidated after a sendout completed ([#416](https://github.com/putyourlightson/craft-campaign/issues/416)).

## 1.24.3 - 2023-08-21
### Added

- Added the `has a value` and `is empty` options to segment conditions ([#407](https://github.com/putyourlightson/craft-campaign/issues/407)).

## 1.24.2 - 2023-06-01
- Added logging of sendout batches and when a sendout completes ([#385](https://github.com/putyourlightson/craft-campaign/issues/385)).

2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "putyourlightson/craft-campaign",
"description": "Send and manage email campaigns, contacts and mailing lists.",
"version": "1.24.3",
"version": "1.24.4",
"type": "craft-plugin",
"homepage": "https://putyourlightson.com/plugins/campaign",
"license": "proprietary",
13 changes: 12 additions & 1 deletion src/services/SendoutsService.php
Original file line number Diff line number Diff line change
@@ -8,6 +8,7 @@
use craft\helpers\DateTimeHelper;
use craft\helpers\StringHelper;
use craft\queue\Queue;
use craft\services\Elements;
use craft\web\View;
use DateTime;
use DOMDocument;
@@ -791,7 +792,17 @@ private function _updateSendoutRecord(SendoutElement $sendout, array $fields): b
// Set attributes from sendout's fields
$sendoutRecord->setAttributes($sendout->toArray($fields), false);

return $sendoutRecord->save();
if (!$sendoutRecord->save()) {
return false;
}

// Invalidate caches for the sendout, since the update may have been
// made programmatically.
if (method_exists(Craft::$app->getElements(), 'invalidateCachesForElement')) {
Craft::$app->getElements()->invalidateCachesForElement($sendout);
}

return true;
}

/**

0 comments on commit 9ecf757

Please sign in to comment.