From 185e4281b3370ad3b478bf9de7262b460a7791e2 Mon Sep 17 00:00:00 2001 From: Matthias Schmidt Date: Thu, 10 Jun 2021 07:51:43 +0200 Subject: [PATCH] Fix embedded object handling after editing comment responses --- .../data/comment/response/CommentResponseAction.class.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wcfsetup/install/files/lib/data/comment/response/CommentResponseAction.class.php b/wcfsetup/install/files/lib/data/comment/response/CommentResponseAction.class.php index 7903550aef..7015c44577 100644 --- a/wcfsetup/install/files/lib/data/comment/response/CommentResponseAction.class.php +++ b/wcfsetup/install/files/lib/data/comment/response/CommentResponseAction.class.php @@ -322,16 +322,14 @@ class CommentResponseAction extends AbstractDatabaseObjectAction 'message' => $htmlInputProcessor->getHtml(), ]; - $htmlInputProcessor->setObjectID($this->comment->getObjectID()); + $htmlInputProcessor->setObjectID($this->response->getObjectID()); $hasEmbeddedObjects = MessageEmbeddedObjectManager::getInstance()->registerObjects($htmlInputProcessor); if ($this->response->hasEmbeddedObjects != $hasEmbeddedObjects) { $data['hasEmbeddedObjects'] = $this->response->hasEmbeddedObjects ? 0 : 1; } (new self([$this->response], 'update', [ - 'data' => [ - 'message' => $htmlInputProcessor->getHtml(), - ], + 'data' => $data, ]))->executeAction(); $response = new CommentResponse($this->response->getObjectID()); -- 2.20.1