diff --git a/lib/Listeners/NodeWrittenResetDocumentListener.php b/lib/Listeners/NodeWrittenResetDocumentListener.php index 999dad8cb7f..3df2a489fdf 100644 --- a/lib/Listeners/NodeWrittenResetDocumentListener.php +++ b/lib/Listeners/NodeWrittenResetDocumentListener.php @@ -39,6 +39,12 @@ public function handle(Event $event): void { if (!$node instanceof File) { return; } + try { + $node->getId(); + } catch (NotFoundException $e) { + // Handle non existing node (during creation). + return; + } if (!$this->documentService->getDocument($node->getId())) { return; }