From ca7990730af37ba105d97527305f0c776bc89b86 Mon Sep 17 00:00:00 2001 From: mhsdesign <85400359+mhsdesign@users.noreply.github.com> Date: Fri, 13 Dec 2024 15:41:29 +0100 Subject: [PATCH] BUGFIX: Ensure that replay does not reset new or detached projections --- .../Classes/Subscription/Engine/SubscriptionEngine.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Neos.ContentRepository.Core/Classes/Subscription/Engine/SubscriptionEngine.php b/Neos.ContentRepository.Core/Classes/Subscription/Engine/SubscriptionEngine.php index d78df39105..bca537c3de 100644 --- a/Neos.ContentRepository.Core/Classes/Subscription/Engine/SubscriptionEngine.php +++ b/Neos.ContentRepository.Core/Classes/Subscription/Engine/SubscriptionEngine.php @@ -112,6 +112,11 @@ public function reset(SubscriptionEngineCriteria|null $criteria = null): Result } $errors = []; foreach ($subscriptions as $subscription) { + if ($subscription->status === SubscriptionStatus::NEW + || !$this->subscribers->contain($subscription->id)) { + // todo test this case! And mark projections as detached? + continue; + } $error = $this->resetSubscription($subscription); if ($error !== null) { $errors[] = $error;