diff options
author | Faisal Alghamdi <falghamdi125@gmail.com> | 2024-11-12 17:51:36 +0300 |
---|---|---|
committer | backportbot[bot] <backportbot[bot]@users.noreply.github.com> | 2024-12-03 09:57:41 +0000 |
commit | 696f7c3975428fc2b6a4f775d76b412163de721f (patch) | |
tree | efb0e69a7f18887f149455176c1961f2c592d210 | |
parent | 0c32d3838326508d10f291b4046ebc8270ec0b4a (diff) | |
download | nextcloud-server-696f7c3975428fc2b6a4f775d76b412163de721f.tar.gz nextcloud-server-696f7c3975428fc2b6a4f775d76b412163de721f.zip |
Fix(files_reminders): Add an error log message that notifications app isn't enabled at files_reminders app load.backport/49232/stable30
Signed-off-by: Faisal Alghamdi <falghamdi125@gmail.com>
-rw-r--r-- | apps/files_reminders/appinfo/info.xml | 3 | ||||
-rw-r--r-- | apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php | 3 |
2 files changed, 6 insertions, 0 deletions
diff --git a/apps/files_reminders/appinfo/info.xml b/apps/files_reminders/appinfo/info.xml index ad0e2ae53f3..5eacd5e1294 100644 --- a/apps/files_reminders/appinfo/info.xml +++ b/apps/files_reminders/appinfo/info.xml @@ -11,6 +11,9 @@ <description><![CDATA[**📣 File reminders** Set file reminders. + +Note: to use the `File reminders` app, ensure that the `Notifications` app is installed and enabled. The `Notifications` app provides the necessary APIs for the `File reminders` app to work correctly. + ]]></description> <version>1.3.0</version> <licence>agpl</licence> diff --git a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php index 52c39f9b04e..a0173aabc64 100644 --- a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php +++ b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php @@ -15,11 +15,13 @@ use OCP\App\IAppManager; use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; use OCP\Util; +use Psr\Log\LoggerInterface; /** @template-implements IEventListener<LoadAdditionalScriptsEvent> */ class LoadAdditionalScriptsListener implements IEventListener { public function __construct( private IAppManager $appManager, + private LoggerInterface $logger, ) { } @@ -29,6 +31,7 @@ class LoadAdditionalScriptsListener implements IEventListener { } if (!$this->appManager->isEnabledForUser('notifications')) { + $this->logger->error('Failed to register the `files_reminders` app. This could happen due to the `notifications` app being disabled.', ['app' => 'files_reminders']); return; } |