/** @var NodeTranslationRepository $nodeTranslationRepo */
$nodeTranslation = $entityManager->getRepository(NodeTranslation::class)->getNodeTranslationByLanguageAndInternalName('fr', 'faq-page');
/** @var FaqItem $faqItem */
$faqItem = $entityManager->getRepository(FaqItem::class)->findOneBySlug($faqItemSlug);
if(!$faqItem) {
throw new NotFoundHttpException('La rubrique de la FAQ n\'existe pas');
} else {
return $this->render('Pages/FaqPage/faqItem.html.twig', [
"breadcrumb" => array(
"Actions collectives " => $this->generateUrl('_slug', array(
'url' => $nodeTranslation->getUrl(),
$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: La rubrique de la FAQ n'existe pas at src/Controller/Front/FaqController.php:30 at App\Controller\Front\FaqController->displayFaqItem() (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) |