diff --git a/src/Menu/MenuItemMatcher.php b/src/Menu/MenuItemMatcher.php index d34154c5f0..1791a80286 100644 --- a/src/Menu/MenuItemMatcher.php +++ b/src/Menu/MenuItemMatcher.php @@ -168,7 +168,7 @@ private function doMarkSelectedPrettyUrlsMenuItem(array $menuItems, Request $req // 2) if no exact match is found, traverse all menu items again and try to find a partial match $currentUrlWithoutHost = $request->getPathInfo(); $currentUrlQueryParams = $request->query->all(); - unset($currentUrlQueryParams['sort'], $currentUrlQueryParams['page']); + unset($currentUrlQueryParams['sort'], $currentUrlQueryParams['page'], $currentUrlQueryParams['query']); // sort them because menu items always have their query parameters sorted ksort($currentUrlQueryParams);