diff --git a/application/src/View/Helper/UserBar.php b/application/src/View/Helper/UserBar.php index 8a35c16a51..5ca0a1ad7d 100644 --- a/application/src/View/Helper/UserBar.php +++ b/application/src/View/Helper/UserBar.php @@ -112,7 +112,9 @@ protected function links(RendererInterface $view, SiteRepresentation $site, User 'url' => $url('admin/site/slug/action', ['site-slug' => $site->slug(), 'action' => 'page']), ]; try { - $page = $view->api()->read('site_pages', ['site' => $site->id(), 'slug' => $routeParams['page-slug']])->getContent(); + $page = empty($routeParams['page-slug']) + ? $site->homepage() + : $view->api()->read('site_pages', ['site' => $site->id(), 'slug' => $routeParams['page-slug']])->getContent(); if ($page->userIsAllowed('edit')) { $links[] = [ 'resource' => $controller,