Symfony Exception

Twig_Error_Loader InvalidArgumentException

HTTP 500 Internal Server Error

Unable to find template "app/catalog/catalog.html.twig" (looked into: /home/moovelec/home/http/app/Resources/views, /home/moovelec/home/http/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form).

Exceptions 2

InvalidArgumentException

  1.         }
  2.         try {
  3.             return $this->environment->loadTemplate((string) $name);
  4.         } catch (LoaderError $e) {
  5.             throw new \InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
  6.         }
  7.     }
  8. }
TwigEngine->load('app/catalog/catalog.html.twig') in vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php (line 49)
  1.      *
  2.      * @throws Error if something went wrong like a thrown exception while rendering the template
  3.      */
  4.     public function render($name, array $parameters = [])
  5.     {
  6.         return $this->load($name)->render($parameters);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      *
TwigEngine->render('app/catalog/catalog.html.twig', array('pagination' => object(SlidingPagination))) in vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php (line 45)
  1.      * {@inheritdoc}
  2.      */
  3.     public function render($name, array $parameters = [])
  4.     {
  5.         try {
  6.             return parent::render($name$parameters);
  7.         } catch (Error $e) {
  8.             if ($name instanceof TemplateReference && !method_exists($e'setSourceContext')) {
  9.                 try {
  10.                     // try to get the real name of the template where the error occurred
  11.                     $name $e->getTemplateName();
TwigEngine->render('app/catalog/catalog.html.twig', array('pagination' => object(SlidingPagination))) in vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php (line 284)
  1.      * @final since version 3.4
  2.      */
  3.     protected function render($view, array $parameters = [], Response $response null)
  4.     {
  5.         if ($this->container->has('templating')) {
  6.             $content $this->container->get('templating')->render($view$parameters);
  7.         } elseif ($this->container->has('twig')) {
  8.             $content $this->container->get('twig')->render($view$parameters);
  9.         } else {
  10.             throw new \LogicException('You can not use the "render" method if the Templating Component or the Twig Bundle are not available. Try running "composer require symfony/twig-bundle".');
  11.         }
Controller->render('app/catalog/catalog.html.twig', array('pagination' => object(SlidingPagination))) in src/CatalogBundle/Controller/DefaultController.php (line 47)
  1.             $request->query->getInt('page'1),
  2.             20,
  3.             ['wrap-queries'=>true]
  4.         );
  5.         return $this->render('app/catalog/catalog.html.twig', array(
  6.             'pagination' => $pagination,
  7.         ));
  8.     }
  9.     /**
  10.      * @Route("/all/products", name="product_list_all", options={"sitemap": true, "priority": 0.7, "changefreq": "daily"})
DefaultController->catalogAction(object(Request)) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 151)
  1.         $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS$event);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response = \call_user_func_array($controller$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new GetResponseForControllerResultEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch(KernelEvents::VIEW$event);
HttpKernel->handleRaw(object(Request), 1) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 68)
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level'ob_get_level());
  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) {
HttpKernel->handle(object(Request), 1, true) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php (line 200)
  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(object(Request)) in web/app.php (line 19)
  1. //$kernel = new AppCache($kernel);
  2. // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
  3. //Request::enableHttpMethodParameterOverride();
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Twig_Error_Loader

Unable to find template "app/catalog/catalog.html.twig" (looked into: /home/moovelec/home/http/app/Resources/views, /home/moovelec/home/http/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form).

  1.         if (!$throw) {
  2.             return false;
  3.         }
  4.         throw new Twig_Error_Loader($this->errorCache[$name]);
  5.     }
  6.     private function normalizeName($name)
  7.     {
  8.         return preg_replace('#/{2,}#''/'str_replace('\\''/'$name));
Twig_Loader_Filesystem->findTemplate('app/catalog/catalog.html.twig') in vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php (line 76)
  1.             return $this->cache[$logicalName];
  2.         }
  3.         $file null;
  4.         try {
  5.             $file parent::findTemplate($logicalName);
  6.         } catch (LoaderError $e) {
  7.             $twigLoaderException $e;
  8.             // for BC
  9.             try {
FilesystemLoader->findTemplate('app/catalog/catalog.html.twig') in vendor/twig/twig/lib/Twig/Loader/Filesystem.php (line 143)
  1.         return new Twig_Source(file_get_contents($path), $name$path);
  2.     }
  3.     public function getCacheKey($name)
  4.     {
  5.         $path $this->findTemplate($name);
  6.         $len strlen($this->rootPath);
  7.         if (=== strncmp($this->rootPath$path$len)) {
  8.             return substr($path$len);
  9.         }
Twig_Loader_Filesystem->getCacheKey('app/catalog/catalog.html.twig') in vendor/twig/twig/lib/Twig/Environment.php (line 270)
  1.      *
  2.      * @return string The template class name
  3.      */
  4.     public function getTemplateClass($name$index null)
  5.     {
  6.         $key $this->getLoader()->getCacheKey($name).$this->optionsHash;
  7.         return $this->templateClassPrefix.hash('sha256'$key).(null === $index '' '_'.$index);
  8.     }
  9.     /**
Twig_Environment->getTemplateClass('app/catalog/catalog.html.twig') in vendor/twig/twig/lib/Twig/Environment.php (line 350)
  1.      *
  2.      * @internal
  3.      */
  4.     public function loadTemplate($name$index null)
  5.     {
  6.         $cls $mainCls $this->getTemplateClass($name);
  7.         if (null !== $index) {
  8.             $cls .= '_'.$index;
  9.         }
  10.         if (isset($this->loadedTemplates[$cls])) {
Twig_Environment->loadTemplate('app/catalog/catalog.html.twig') in vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php (line 125)
  1.         if ($name instanceof Template) {
  2.             return $name;
  3.         }
  4.         try {
  5.             return $this->environment->loadTemplate((string) $name);
  6.         } catch (LoaderError $e) {
  7.             throw new \InvalidArgumentException($e->getMessage(), $e->getCode(), $e);
  8.         }
  9.     }
  10. }
TwigEngine->load('app/catalog/catalog.html.twig') in vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php (line 49)
  1.      *
  2.      * @throws Error if something went wrong like a thrown exception while rendering the template
  3.      */
  4.     public function render($name, array $parameters = [])
  5.     {
  6.         return $this->load($name)->render($parameters);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      *
TwigEngine->render('app/catalog/catalog.html.twig', array('pagination' => object(SlidingPagination))) in vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php (line 45)
  1.      * {@inheritdoc}
  2.      */
  3.     public function render($name, array $parameters = [])
  4.     {
  5.         try {
  6.             return parent::render($name$parameters);
  7.         } catch (Error $e) {
  8.             if ($name instanceof TemplateReference && !method_exists($e'setSourceContext')) {
  9.                 try {
  10.                     // try to get the real name of the template where the error occurred
  11.                     $name $e->getTemplateName();
TwigEngine->render('app/catalog/catalog.html.twig', array('pagination' => object(SlidingPagination))) in vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php (line 284)
  1.      * @final since version 3.4
  2.      */
  3.     protected function render($view, array $parameters = [], Response $response null)
  4.     {
  5.         if ($this->container->has('templating')) {
  6.             $content $this->container->get('templating')->render($view$parameters);
  7.         } elseif ($this->container->has('twig')) {
  8.             $content $this->container->get('twig')->render($view$parameters);
  9.         } else {
  10.             throw new \LogicException('You can not use the "render" method if the Templating Component or the Twig Bundle are not available. Try running "composer require symfony/twig-bundle".');
  11.         }
Controller->render('app/catalog/catalog.html.twig', array('pagination' => object(SlidingPagination))) in src/CatalogBundle/Controller/DefaultController.php (line 47)
  1.             $request->query->getInt('page'1),
  2.             20,
  3.             ['wrap-queries'=>true]
  4.         );
  5.         return $this->render('app/catalog/catalog.html.twig', array(
  6.             'pagination' => $pagination,
  7.         ));
  8.     }
  9.     /**
  10.      * @Route("/all/products", name="product_list_all", options={"sitemap": true, "priority": 0.7, "changefreq": "daily"})
DefaultController->catalogAction(object(Request)) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 151)
  1.         $this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS$event);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response = \call_user_func_array($controller$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new GetResponseForControllerResultEvent($this$request$type$response);
  9.             $this->dispatcher->dispatch(KernelEvents::VIEW$event);
HttpKernel->handleRaw(object(Request), 1) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php (line 68)
  1.     public function handle(Request $request$type HttpKernelInterface::MASTER_REQUEST$catch true)
  2.     {
  3.         $request->headers->set('X-Php-Ob-Level'ob_get_level());
  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) {
HttpKernel->handle(object(Request), 1, true) in vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php (line 200)
  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(object(Request)) in web/app.php (line 19)
  1. //$kernel = new AppCache($kernel);
  2. // When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
  3. //Request::enableHttpMethodParameterOverride();
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Logs

No log messages

Stack Traces 2

[2/2] InvalidArgumentException

InvalidArgumentException:
Unable to find template "app/catalog/catalog.html.twig" (looked into: /home/moovelec/home/http/app/Resources/views, /home/moovelec/home/http/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form).

  at vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php:127
  at Symfony\Bridge\Twig\TwigEngine->load('app/catalog/catalog.html.twig')
     (vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php:49)
  at Symfony\Bridge\Twig\TwigEngine->render('app/catalog/catalog.html.twig', array('pagination' => object(SlidingPagination)))
     (vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php:45)
  at Symfony\Bundle\TwigBundle\TwigEngine->render('app/catalog/catalog.html.twig', array('pagination' => object(SlidingPagination)))
     (vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:284)
  at Symfony\Bundle\FrameworkBundle\Controller\Controller->render('app/catalog/catalog.html.twig', array('pagination' => object(SlidingPagination)))
     (src/CatalogBundle/Controller/DefaultController.php:47)
  at CatalogBundle\Controller\DefaultController->catalogAction(object(Request))
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/app.php:19)

                                

[1/2] Twig_Error_Loader

Twig_Error_Loader:
Unable to find template "app/catalog/catalog.html.twig" (looked into: /home/moovelec/home/http/app/Resources/views, /home/moovelec/home/http/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form).

  at vendor/twig/twig/lib/Twig/Loader/Filesystem.php:234
  at Twig_Loader_Filesystem->findTemplate('app/catalog/catalog.html.twig')
     (vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php:76)
  at Symfony\Bundle\TwigBundle\Loader\FilesystemLoader->findTemplate('app/catalog/catalog.html.twig')
     (vendor/twig/twig/lib/Twig/Loader/Filesystem.php:143)
  at Twig_Loader_Filesystem->getCacheKey('app/catalog/catalog.html.twig')
     (vendor/twig/twig/lib/Twig/Environment.php:270)
  at Twig_Environment->getTemplateClass('app/catalog/catalog.html.twig')
     (vendor/twig/twig/lib/Twig/Environment.php:350)
  at Twig_Environment->loadTemplate('app/catalog/catalog.html.twig')
     (vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php:125)
  at Symfony\Bridge\Twig\TwigEngine->load('app/catalog/catalog.html.twig')
     (vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php:49)
  at Symfony\Bridge\Twig\TwigEngine->render('app/catalog/catalog.html.twig', array('pagination' => object(SlidingPagination)))
     (vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php:45)
  at Symfony\Bundle\TwigBundle\TwigEngine->render('app/catalog/catalog.html.twig', array('pagination' => object(SlidingPagination)))
     (vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:284)
  at Symfony\Bundle\FrameworkBundle\Controller\Controller->render('app/catalog/catalog.html.twig', array('pagination' => object(SlidingPagination)))
     (src/CatalogBundle/Controller/DefaultController.php:47)
  at CatalogBundle\Controller\DefaultController->catalogAction(object(Request))
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:151)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/HttpKernel.php:68)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Kernel.php:200)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/app.php:19)