From dbe85f4df9a8de4f93cf52234d7fa709a8aadf05 Mon Sep 17 00:00:00 2001 From: Tam Date: Thu, 19 Oct 2023 16:19:29 +0100 Subject: [PATCH] Fix link field not caching element details on save --- CHANGELOG.md | 4 ++++ src/fields/LinkField.php | 2 ++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3b766a8..5065397 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 4.2.1 - 2023-10-19 +### Fixed +- Fix link field not caching element details on save + ## 4.2.0 - 2023-10-06 ### Added - Assets will have their CDN cache cleared when edited diff --git a/src/fields/LinkField.php b/src/fields/LinkField.php index a5bc639..69f3ed7 100644 --- a/src/fields/LinkField.php +++ b/src/fields/LinkField.php @@ -204,6 +204,8 @@ public function beforeElementSave (ElementInterface $element, bool $isNew): bool } } + $element->{$this->handle} = $value; + return parent::beforeElementSave($element, $isNew); }