From 2695291b0e351d8da809680226039b8de2114107 Mon Sep 17 00:00:00 2001 From: ywisax Date: Sun, 12 Jan 2025 16:16:48 +0800 Subject: [PATCH] Update MenuItemMatcher.php, fix menu active status Relate issue: https://github.com/EasyCorp/EasyAdminBundle/issues/6704 --- src/Menu/MenuItemMatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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);