From 61ab5cf157263185b1c652f0e3a936814f7ab66b Mon Sep 17 00:00:00 2001 From: Maxence Lange Date: Sat, 12 Apr 2025 18:48:42 -0100 Subject: [PATCH] fix(setup): ignore missing theming app Signed-off-by: Maxence Lange --- lib/private/TemplateLayout.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index d9c02619943..374972ece22 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -198,8 +198,13 @@ class TemplateLayout { $page->assign('direction', $direction); // Set body data-theme - $themesService = Server::get(\OCA\Theming\Service\ThemesService::class); - $page->assign('enabledThemes', $themesService->getEnabledThemes()); + try { + $themesService = Server::get(\OCA\Theming\Service\ThemesService::class); + } catch (\OCP\AppFramework\QueryException) { + $themesService = null; + } + + $page->assign('enabledThemes', $themesService?->getEnabledThemes() ?? []); if ($this->config->getSystemValueBool('installed', false)) { if (empty(self::$versionHash)) {