From 2b884830aedb3a84c148bf08d4338924aa25e2a5 Mon Sep 17 00:00:00 2001 From: Pablo Ogando Ferreira Date: Mon, 19 Aug 2024 12:50:12 +0200 Subject: [PATCH] fix(27178): Remove youtube document on upload instead of modify it --- Services/VideoInsertService.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Services/VideoInsertService.php b/Services/VideoInsertService.php index 312eb7c..d3e943c 100644 --- a/Services/VideoInsertService.php +++ b/Services/VideoInsertService.php @@ -129,7 +129,9 @@ private function generateYoutubeDocument(MultimediaObject $multimediaObject, Tag ]); if ($youtube) { - return $youtube; + $this->documentManager->remove($youtube); + $multimediaObject->removeProperty('youtubeurl'); + $this->documentManager->flush(); } $youtube = new Youtube();