Symfony Exception

NotFoundHttpException

HTTP 404 Not Found

Exception

Symfony\Component\HttpKernel\Exception\ NotFoundHttpException

  1.         $lot $this
  2.           ->_model('lot')
  3.           ->getForTypeById($id1);
  4.         if (empty($lot)) {
  5.             throw new NotFoundHttpException();
  6.         }
  7.         $similar $this
  8.           ->_model('lot')
  9.           ->getSimilar($lot);
in vendor/symfony/http-kernel/HttpKernel.php->cityAction (line 169)
  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 web/app.php (line 52)
  1. // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
  2. //Request::enableHttpMethodParameterOverride();
  3.     $request Request::createFromGlobals();
  4.     try {
  5.         $response $kernel->handle($requestHttpKernelInterface::MASTER_REQUESTtrue); //$dev
  6.     } catch (Exception $e) {
  7.         if ($dev) {
  8.             if (property_exists($e'xdebug_message')) {
  9.                 $message $e->xdebug_message;
  10.             } else {

Logs 1

Level Channel Message
ERROR 07:53:25 request Uncaught PHP Exception Symfony\Component\HttpKernel\Exception\NotFoundHttpException: "" at /home/troikaestate/public_html/src/Troika/RealEstateBundle/Controller/LotController.php line 52
{
    "exception": {
        "xdebug_message": "<tr><th align='left' bgcolor='#f57900' colspan=\"5\"><span style='background-color: #cc0000; color: #fce94f; font-size: x-large;'>( ! )</span> Symfony\\Component\\HttpKernel\\Exception\\NotFoundHttpException:  in /home/troikaestate/public_html/src/Troika/RealEstateBundle/Controller/LotController.php on line <i>52</i></th></tr>\n<tr><th align='left' bgcolor='#e9b96e' colspan='5'>Call Stack</th></tr>\n<tr><th align='center' bgcolor='#eeeeec'>#</th><th align='left' bgcolor='#eeeeec'>Time</th><th align='left' bgcolor='#eeeeec'>Memory</th><th align='left' bgcolor='#eeeeec'>Function</th><th align='left' bgcolor='#eeeeec'>Location</th></tr>\n<tr><td bgcolor='#eeeeec' align='center'>1</td><td bgcolor='#eeeeec' align='center'>0.0002</td><td bgcolor='#eeeeec' align='right'>360176</td><td bgcolor='#eeeeec'>{main}(  )</td><td title='/home/troikaestate/public_html/web/app.php' bgcolor='#eeeeec'>.../app.php<b>:</b>0</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>2</td><td bgcolor='#eeeeec' align='center'>0.0059</td><td bgcolor='#eeeeec' align='right'>406576</td><td bgcolor='#eeeeec'>Symfony\\Component\\HttpKernel\\Kernel->handle( <span>$request = </span><span>class Symfony\\Component\\HttpFoundation\\Request { public $attributes = class Symfony\\Component\\HttpFoundation\\ParameterBag { protected $parameters = [...] }; public $request = class Symfony\\Component\\HttpFoundation\\ParameterBag { protected $parameters = [...] }; public $query = class Symfony\\Component\\HttpFoundation\\ParameterBag { protected $parameters = [...] }; public $server = class Symfony\\Component\\HttpFoundation\\ServerBag { protected $parameters = [...] }; public $files = class Symfony\\Component\\HttpFoundation\\FileBag { protected $parameters = [...] }; public $cookies = class Symfony\\Component\\HttpFoundation\\ParameterBag { protected $parameters = [...] }; public $headers = class Symfony\\Component\\HttpFoundation\\HeaderBag { protected $headers = [...]; protected $cacheControl = [...] }; protected $content = NULL; protected $languages = NULL; protected $charsets = NULL; protected $encodings = NULL; protected $acceptableContentTypes = NULL; protected $pathInfo = &#39;/elit_kvartiry/799&#39;; protected $requestUri = &#39;/elit_kvartiry/799&#39;; protected $baseUrl = &#39;&#39;; protected $basePath = NULL; protected $method = &#39;GET&#39;; protected $format = NULL; protected $session = class Closure { virtual $closure = &quot;$this-&gt;Symfony\\Component\\HttpKernel\\EventListener\\{closure}&quot; }; protected $locale = NULL; protected $defaultLocale = &#39;ru&#39;; private $preferredFormat = NULL; private $isHostValid = TRUE; private $isForwardedValid = TRUE }</span>, <span>$type = </span><span>1</span>, <span>$catch = </span><span>TRUE</span> )</td><td title='/home/troikaestate/public_html/web/app.php' bgcolor='#eeeeec'>.../app.php<b>:</b>52</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>3</td><td bgcolor='#eeeeec' align='center'>0.0855</td><td bgcolor='#eeeeec' align='right'>1099976</td><td bgcolor='#eeeeec'>Symfony\\Component\\HttpKernel\\HttpKernel->handle( <span>$request = </span><span>class Symfony\\Component\\HttpFoundation\\Request { public $attributes = class Symfony\\Component\\HttpFoundation\\ParameterBag { protected $parameters = [...] }; public $request = class Symfony\\Component\\HttpFoundation\\ParameterBag { protected $parameters = [...] }; public $query = class Symfony\\Component\\HttpFoundation\\ParameterBag { protected $parameters = [...] }; public $server = class Symfony\\Component\\HttpFoundation\\ServerBag { protected $parameters = [...] }; public $files = class Symfony\\Component\\HttpFoundation\\FileBag { protected $parameters = [...] }; public $cookies = class Symfony\\Component\\HttpFoundation\\ParameterBag { protected $parameters = [...] }; public $headers = class Symfony\\Component\\HttpFoundation\\HeaderBag { protected $headers = [...]; protected $cacheControl = [...] }; protected $content = NULL; protected $languages = NULL; protected $charsets = NULL; protected $encodings = NULL; protected $acceptableContentTypes = NULL; protected $pathInfo = &#39;/elit_kvartiry/799&#39;; protected $requestUri = &#39;/elit_kvartiry/799&#39;; protected $baseUrl = &#39;&#39;; protected $basePath = NULL; protected $method = &#39;GET&#39;; protected $format = NULL; protected $session = class Closure { virtual $closure = &quot;$this-&gt;Symfony\\Component\\HttpKernel\\EventListener\\{closure}&quot; }; protected $locale = NULL; protected $defaultLocale = &#39;ru&#39;; private $preferredFormat = NULL; private $isHostValid = TRUE; private $isForwardedValid = TRUE }</span>, <span>$type = </span><span>1</span>, <span>$catch = </span><span>TRUE</span> )</td><td title='/home/troikaestate/public_html/vendor/symfony/http-kernel/Kernel.php' bgcolor='#eeeeec'>.../Kernel.php<b>:</b>201</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>4</td><td bgcolor='#eeeeec' align='center'>0.0856</td><td bgcolor='#eeeeec' align='right'>1100768</td><td bgcolor='#eeeeec'>Symfony\\Component\\HttpKernel\\HttpKernel->handleRaw( <span>$request = </span><span>class Symfony\\Component\\HttpFoundation\\Request { public $attributes = class Symfony\\Component\\HttpFoundation\\ParameterBag { protected $parameters = [...] }; public $request = class Symfony\\Component\\HttpFoundation\\ParameterBag { protected $parameters = [...] }; public $query = class Symfony\\Component\\HttpFoundation\\ParameterBag { protected $parameters = [...] }; public $server = class Symfony\\Component\\HttpFoundation\\ServerBag { protected $parameters = [...] }; public $files = class Symfony\\Component\\HttpFoundation\\FileBag { protected $parameters = [...] }; public $cookies = class Symfony\\Component\\HttpFoundation\\ParameterBag { protected $parameters = [...] }; public $headers = class Symfony\\Component\\HttpFoundation\\HeaderBag { protected $headers = [...]; protected $cacheControl = [...] }; protected $content = NULL; protected $languages = NULL; protected $charsets = NULL; protected $encodings = NULL; protected $acceptableContentTypes = NULL; protected $pathInfo = &#39;/elit_kvartiry/799&#39;; protected $requestUri = &#39;/elit_kvartiry/799&#39;; protected $baseUrl = &#39;&#39;; protected $basePath = NULL; protected $method = &#39;GET&#39;; protected $format = NULL; protected $session = class Closure { virtual $closure = &quot;$this-&gt;Symfony\\Component\\HttpKernel\\EventListener\\{closure}&quot; }; protected $locale = NULL; protected $defaultLocale = &#39;ru&#39;; private $preferredFormat = NULL; private $isHostValid = TRUE; private $isForwardedValid = TRUE }</span>, <span>$type = </span><span>1</span> )</td><td title='/home/troikaestate/public_html/vendor/symfony/http-kernel/HttpKernel.php' bgcolor='#eeeeec'>.../HttpKernel.php<b>:</b>81</td></tr>\n<tr><td bgcolor='#eeeeec' align='center'>5</td><td bgcolor='#eeeeec' align='center'>0.1163</td><td bgcolor='#eeeeec' align='right'>1681000</td><td bgcolor='#eeeeec'>Troika\\RealEstateBundle\\Controller\\LotController->cityAction( <span>$id = </span><span>&#39;799&#39;</span> )</td><td title='/home/troikaestate/public_html/vendor/symfony/http-kernel/HttpKernel.php' bgcolor='#eeeeec'>.../HttpKernel.php<b>:</b>169</td></tr>\n"
    }
}

Stack Trace

NotFoundHttpException

Symfony\Component\HttpKernel\Exception\NotFoundHttpException:

  at src/Troika/RealEstateBundle/Controller/LotController.php:52
  at Troika\RealEstateBundle\Controller\LotController->cityAction()
     (vendor/symfony/http-kernel/HttpKernel.php:169)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:81)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:201)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (web/app.php:52)