From 72fbfa579bb9dd4306585ead237cca657e263fb6 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 86cee2e7f5b43..70b27bb697603 100644 --- a/apps/files_reminders/appinfo/info.xml +++ b/apps/files_reminders/appinfo/info.xml @@ -7,6 +7,9 @@ 1.2.0 agpl diff --git a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php index ab66b6bc7a01f..62818cf18d441 100644 --- a/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php +++ b/apps/files_reminders/lib/Listener/LoadAdditionalScriptsListener.php @@ -32,11 +32,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, ) { } @@ -46,6 +48,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; }