// Redirect to the 404 page if it exists
$httpNotFound = true;
$contentType = $contentTypeManager->getMainType();
$contentItem = $contentSlugger->getContentBySlug($contentType->getSlugDescription()->getPrefix($this->translationManager->getActiveLocale()) . '404');
if (!$contentItem) {
throw $this->createNotFoundException('Content not found');
}
} elseif ($redirectResponse = $this->getAutoRedirectResponse($contentItem, $contentType, $request)) {
return $redirectResponse;
}
$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);
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
No log messages
NotFoundHttpException |
---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: Content not found at vendor/symfony/framework-bundle/Controller/ControllerTrait.php:294 at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->createNotFoundException('Content not found') (vendor/forwart-cms/frontend-core-bundle/src/Controller/ContentController.php:59) at ForwartCms\FrontendCoreBundle\Controller\ContentController->show(null, object(ContentType), object(Request), object(ContentSlugger), object(ContentTypeManager), object(FrontendRenderer), object(ContentTemplateResolver), object(TraceableEventDispatcher)) (vendor/symfony/http-kernel/HttpKernel.php:169) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:81) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:201) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:37) |