From 393de5fe7ac21c4509c2832858c39564fa574193 Mon Sep 17 00:00:00 2001 From: Iwona Just Date: Thu, 21 Mar 2024 09:01:08 +0000 Subject: [PATCH 1/2] recent activity element can be a response --- src/controllers/ElementsController.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/controllers/ElementsController.php b/src/controllers/ElementsController.php index 3d7870bbd77..9ad6d41b9a2 100644 --- a/src/controllers/ElementsController.php +++ b/src/controllers/ElementsController.php @@ -1787,6 +1787,10 @@ public function actionRecentActivity(): Response { $element = $this->_element(); + if ($element instanceof Response) { + return $element; + } + if (!$element || $element->getIsRevision()) { throw new BadRequestHttpException('No element was identified by the request.'); } From a518fa6b042881f612c091529cc124670e2b5f17 Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Thu, 21 Mar 2024 21:43:25 -0700 Subject: [PATCH 2/2] Release note [ci skip] --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1392da4a867..e6ce689efd8 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,6 +6,7 @@ - The `setup/cloud` command now ensures that the environment and `composer.json` are configured to use PHP 8.1+. - Fixed a JavaScript error that could occur if another error occurred when performing an element action. - Fixed a bug where filesystems’ `afterSave()` and `afterDelete()` methods weren’t getting called. ([#14634](https://github.com/craftcms/cms/pull/14634)) +- Fixed an error that could occur on `elements/recent-activity` Ajax requests when editing an element. ([#14635](https://github.com/craftcms/cms/issues/14635)) ## 4.8.4 - 2024-03-19