http://sustainability.eschenbach-optik.com/robots.txt

Exceptions

Content not found

  • Exception
  • Logs
  • Stack Trace

Symfony\Component\HttpKernel\Exception\ NotFoundHttpException

  1.      * Renders a single record.
  2.      */
  3.     public function renderSingle(?Content $recordbool $requirePublished true, array $templates = []): Response
  4.     {
  5.         if (! $record) {
  6.             throw new NotFoundHttpException('Content not found');
  7.         }
  8.         // If the content is not 'published' we throw a 404, unless we've overridden it.
  9.         if (($record->getStatus() !== Statuses::PUBLISHED) && $requirePublished) {
  10.             throw new NotFoundHttpException('Content is not published');
  1.         // Check if we're attempting to preview an unpublished Record
  2.         if ($record && $this->validateSecret($this->request->get('secret'''), (string) $record->getId())) {
  3.             $requirePublished false;
  4.         }
  5.         return $this->renderSingle($record$requirePublished);
  6.     }
  7.     public function contentByFieldValue(string $contentTypeSlugstring $fieldstring $valuebool $requirePublished true): Response
  8.     {
  9.         $contentType ContentType::factory($contentTypeSlug$this->config->get('contenttypes'));
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 37)
  1.     Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);