From f4d17e5eb682a85649336b7a12f83a35948f34f7 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 1 Apr 2024 18:45:42 +0200 Subject: [PATCH] [Backport 12.4] [BUGFIX] Invoke addFlashMessage() correctly when deleting a post (#84) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Releases: main, 12.4 --------- Co-authored-by: Chris Müller <2566282+brotkrueml@users.noreply.github.com> --- CHANGELOG.md | 1 + Classes/Controller/PostController.php | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2642efd..aafa2bd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ This project adheres to [Semantic Versioning](https://semver.org/). ### Fixed - Update locallang_db.xlf - missing field names added (#76) - Correct the integration of categories (#77) +- Invoke addFlashMessage() correctly when deleting a post (#83) ## 12.0.4 - 2023-09-16 diff --git a/Classes/Controller/PostController.php b/Classes/Controller/PostController.php index b24bbd4..c3e2786 100644 --- a/Classes/Controller/PostController.php +++ b/Classes/Controller/PostController.php @@ -228,7 +228,7 @@ public function deleteAction( ): ResponseInterface { $this->checkBlogAdminAccess(); $this->postRepository->remove($post); - $this->addFlashMessage('deleted', ContextualFeedbackSeverity::INFO); + $this->addFlashMessage('The post has been deleted.', 'Deleted', ContextualFeedbackSeverity::INFO); return $this->redirect('index', null, null, ['blog' => $blog]); } }