->where($qb->expr()->like('a.origin', ':urlSlug'))
->setParameter('urlSlug', '/actions-collectives/'.$subjectSlug.'/'.$acSlug.'%')->setMaxResults(1)->getQuery()->getOneOrNullResult();
if($redirectFound) {
return $this->redirect(($redirectFound->getTarget()));
} else {
throw new NotFoundHttpException('Action collective introuvable');
}
}
}
/**
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['REMOTE_ADDR'] == '82.65.193.90');
//$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
No log messages
NotFoundHttpException |
---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: Action collective introuvable at src/Controller/Front/ActionCollectiveArticleController.php:187 at App\Controller\Front\ActionCollectiveArticleController->redirectSubAc() (vendor/symfony/http-kernel/HttpKernel.php:158) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:80) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:201) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:25) |