From 3d410aaaad8290c32bf611abca1cbcc9823db860 Mon Sep 17 00:00:00 2001 From: Faisal Alghamdi Date: Tue, 12 Nov 2024 17:51:36 +0300 Subject: [PATCH] Fix(files_reminders): Add an error log message that notifications app isn't enabled at files_reminders app load. Signed-off-by: Faisal Alghamdi --- apps/files_reminders/appinfo/info.xml | 3 +++ .../lib/Listener/LoadAdditionalScriptsListener.php | 3 +++ 2 files changed, 6 insertions(+) diff --git a/apps/files_reminders/appinfo/info.xml b/apps/files_reminders/appinfo/info.xml index a3d5fe43f9482..dd149cea42d42 100644 --- a/apps/files_reminders/appinfo/info.xml +++ b/apps/files_reminders/appinfo/info.xml @@ -11,6 +11,9 @@ 1.4.0 agpl diff --git a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php index 52c39f9b04efc..a0173aabc6469 100644 --- a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php +++ b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php @@ -15,11 +15,13 @@ use OCP\EventDispatcher\Event; use OCP\EventDispatcher\IEventListener; use OCP\Util; +use Psr\Log\LoggerInterface; /** @template-implements IEventListener */ class LoadAdditionalScriptsListener implements IEventListener { public function __construct( private IAppManager $appManager, + private LoggerInterface $logger, ) { } @@ -29,6 +31,7 @@ public function handle(Event $event): void { } 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; }