From cf6f289177c81a06ebf93ea9289a159d1f78754b Mon Sep 17 00:00:00 2001 From: Marcel Werk Date: Fri, 10 Nov 2023 16:56:21 +0100 Subject: [PATCH] Fix issue when creating an article with attachments in the admin panel --- .../install/files/lib/acp/form/ArticleAddForm.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php b/wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php index 948274a984..5f46149f40 100644 --- a/wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/ArticleAddForm.class.php @@ -574,6 +574,13 @@ class ArticleAddForm extends AbstractForm $this->title = $this->teaser = $this->content = $this->images = $this->imageID = $this->teaserImages = $this->teaserImageID == $this->tags = []; $this->metaTitle = $this->metaDescription = []; + // Reload attachment handler to reset the uploaded attachments. + $this->attachmentHandler = new AttachmentHandler( + $this->attachmentObjectType, + $this->attachmentObjectID, + $this->tmpHash + ); + $this->setDefaultValues(); } -- 2.20.1