diff --git a/hdbt.theme b/hdbt.theme index 84472d8f6..a193464d1 100644 --- a/hdbt.theme +++ b/hdbt.theme @@ -631,7 +631,13 @@ function hdbt_preprocess_block(&$variables): void { $front_page = Url::fromRoute('', [], ['absolute' => TRUE]); $uri_parts = parse_url($front_page->toString()); $url = Url::fromUri('internal:' . $uri_parts['path']); - $params = $url->getRouteParameters(); + + try { + $params = $url->getRouteParameters(); + } + catch (\Exception $e) { + $params = []; + } if (!empty($params)) { $entity_type = key($params);