diff --git a/Grid/Grid.php b/Grid/Grid.php index 23530b4c..0b9b3611 100644 --- a/Grid/Grid.php +++ b/Grid/Grid.php @@ -1503,7 +1503,15 @@ public function setRouteUrl($routeUrl) public function getRouteUrl() { if ($this->routeUrl === null) { - $this->routeUrl = $this->router->generate($this->request->get('_route'), $this->getRouteParameters()); + if(!$this->request->get('_route')){ + $this->routeUrl = + $this->router->generate( + $this->request->attributes->get('request')->attributes->get('_route'), + $this->request->attributes->get('request')->attributes->get('_route_params') + ); + } else { + $this->routeUrl = $this->router->generate($this->request->get('_route'), $this->getRouteParameters()); + } } return $this->routeUrl;