From 7dba4bc2860b6340d6e9121f8ed60c2d5b2e4476 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Mon, 27 Apr 2026 19:07:40 +0200 Subject: [PATCH] fix(core): provide valid initial state also on public templates The `core apps` initial state should be an array of apps currently available. But for public templates when there is no navigation entry the array would contain `[null]` instead of `[]` which breaks some use cases (e.g. apps that rely on some nextcloud-vue versions). Signed-off-by: Ferdinand Thiessen --- lib/private/TemplateLayout.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index 78ad5e290d5..4d558006093 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -157,7 +157,8 @@ class TemplateLayout { $page->assign('appid', $appId); $page->assign('bodyid', 'body-public'); - $this->initialState->provideInitialState('core', 'apps', [$this->navigationManager->get($appId)]); + $currentAppData = $this->navigationManager->get($appId); + $this->initialState->provideInitialState('core', 'apps', $currentAppData === null ? [] : [$currentAppData]); // Set logo link target $logoUrl = $this->config->getSystemValueString('logo_url', '');