Skip to content

Commit

Permalink
bug #6709 Update AdminRouterSubscriber.php (damien-louis)
Browse files Browse the repository at this point in the history
This PR was squashed before being merged into the 4.x branch.

Discussion
----------

Update AdminRouterSubscriber.php

Relate issue: #6707

<!--
Thanks for your contribution! If you are proposing a new feature that is complex,
please open an issue first so we can discuss about it.

Note: all your contributions adhere implicitly to the MIT license
-->

Commits
-------

03d51dd Update AdminRouterSubscriber.php
  • Loading branch information
javiereguiluz committed Jan 13, 2025
2 parents 082be34 + 03d51dd commit c14f516
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/EventListener/AdminRouterSubscriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -172,11 +172,13 @@ public function onKernelRequest(RequestEvent $event): void
}

$prettyUrlRoute = $this->adminRouteGenerator->findRouteName($dashboardControllerFqcn, $crudControllerFqcn, $request->query->get(EA::CRUD_ACTION, ''));
$request->query->remove(EA::CRUD_CONTROLLER_FQCN);
if (null !== $prettyUrlRoute) {
$request->query->remove(EA::CRUD_CONTROLLER_FQCN);

$event->setResponse(new RedirectResponse($this->urlGenerator->generate($prettyUrlRoute, $request->query->all())));
$event->setResponse(new RedirectResponse($this->urlGenerator->generate($prettyUrlRoute, $request->query->all())));

return;
return;
}
}

if (null === $dashboardControllerInstance = $this->getDashboardControllerInstance($dashboardControllerFqcn, $request)) {
Expand Down

0 comments on commit c14f516

Please sign in to comment.