From b0135a092ee55f7cdba41a7ed5c198847fb805f5 Mon Sep 17 00:00:00 2001 From: Tim Kelty Date: Wed, 20 Mar 2024 12:07:43 -0400 Subject: [PATCH 1/2] Trigger expected FS events --- src/services/Fs.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/services/Fs.php b/src/services/Fs.php index 35ae5e7da1d..11800771b06 100644 --- a/src/services/Fs.php +++ b/src/services/Fs.php @@ -206,6 +206,8 @@ public function saveFilesystem(FsInterface $fs, bool $runValidation = true): boo } } + $fs->afterSave($isNewFs); + // Clear caches $this->_filesystems = null; @@ -252,6 +254,8 @@ public function removeFilesystem(FsInterface $fs): bool // Clear caches $this->_filesystems = null; + $fs->afterDelete(); + return true; } } From 553eadd777d5b12cc7b8d549c4a0760c4337dcfb Mon Sep 17 00:00:00 2001 From: brandonkelly Date: Thu, 21 Mar 2024 21:31:30 -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 f4031852dbb..1392da4a867 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Selectize inputs no longer automatically select the hovered option on Tab press. ([selectize/selectize.js#2085](https://github.com/selectize/selectize.js/issues/2085)) - 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)) ## 4.8.4 - 2024-03-19