diff --git a/src/Model/BlogMemberExtension.php b/src/Model/BlogMemberExtension.php index 6d924d66..0be59201 100644 --- a/src/Model/BlogMemberExtension.php +++ b/src/Model/BlogMemberExtension.php @@ -40,6 +40,10 @@ class BlogMemberExtension extends DataExtension 'BlogProfileImage' => Image::class ]; + private static array $owns = [ + 'BlogProfileImage', + ]; + /** * @var array */ @@ -64,11 +68,6 @@ public function onBeforeWrite() $this->owner->URLSegment = preg_replace('/-[0-9]+$/', '', $this->owner->URLSegment ?? '') . '-' . $count; $count++; } - - // Auto publish profile images - if ($this->owner->BlogProfileImage() && $this->owner->BlogProfileImage()->exists()) { - $this->owner->BlogProfileImage()->publishSingle(); - } } /**