Symfony Exception

LoaderError InvalidArgumentException

HTTP 500 Internal Server Error

Unable to find template "AlivashopBundle:Main:payment.html.twig" (looked into: /srv/data/web/vhosts/www.aliva.fr/app/Resources/views, /srv/data/web/vhosts/www.aliva.fr/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('AlivashopBundle:Main:payment.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 = array())
  5.     {
  6.         return $this->load($name)->render($parameters);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      *
TwigEngine->render('AlivashopBundle:Main:payment.html.twig', array()) in vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php (line 45)
  1.      * {@inheritdoc}
  2.      */
  3.     public function render($name, array $parameters = array())
  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('AlivashopBundle:Main:payment.html.twig', array()) in vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php (line 234)
  1.      * @return Response A Response instance
  2.      */
  3.     protected function render($view, array $parameters = array(), 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.');
  11.         }
Controller->render('AlivashopBundle:Main:payment.html.twig') in src/AlivashopBundle/Controller/MainController.php (line 48)
  1.         return $this->render('AlivashopBundle:Main:delivery.html.twig');
  2.     }
  3.     
  4.     public function paymentAction()
  5.     {
  6.         return $this->render('AlivashopBundle:Main:payment.html.twig');
  7.     }
  8.     
  9.     public function sendMessageAction()
  10.     {
  11.         $from $_POST['from'];
MainController->paymentAction() 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 169)
  1.     {
  2.         if (false === $this->booted) {
  3.             $this->boot();
  4.         }
  5.         return $this->getHttpKernel()->handle($request$type$catch);
  6.     }
  7.     /**
  8.      * Gets a HTTP kernel from the container.
  9.      *
Kernel->handle(object(Request)) in htdocs/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\ LoaderError

Unable to find template "AlivashopBundle:Main:payment.html.twig" (looked into: /srv/data/web/vhosts/www.aliva.fr/app/Resources/views, /srv/data/web/vhosts/www.aliva.fr/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form).

  1.         if (!$throw) {
  2.             return false;
  3.         }
  4.         throw new LoaderError($this->errorCache[$name]);
  5.     }
  6.     protected function parseName($name$default self::MAIN_NAMESPACE)
  7.     {
  8.         if (isset($name[0]) && '@' == $name[0]) {
FilesystemLoader->findTemplate('AlivashopBundle:Main:payment.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('AlivashopBundle:Main:payment.html.twig') in vendor/twig/twig/src/Loader/FilesystemLoader.php (line 161)
  1.         return new Source(file_get_contents($path), $name$path);
  2.     }
  3.     public function getCacheKey($name)
  4.     {
  5.         if (null === ($path $this->findTemplate($name)) || false === $path) {
  6.             return '';
  7.         }
  8.         $len = \strlen($this->rootPath);
  9.         if (=== strncmp($this->rootPath$path$len)) {
  10.             return substr($path$len);
FilesystemLoader->getCacheKey('AlivashopBundle:Main:payment.html.twig') in vendor/twig/twig/src/Environment.php (line 351)
  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.     /**
Environment->getTemplateClass('AlivashopBundle:Main:payment.html.twig') in vendor/twig/twig/src/Environment.php (line 445)
  1.      *
  2.      * @internal
  3.      */
  4.     public function loadTemplate($name$index null)
  5.     {
  6.         return $this->loadClass($this->getTemplateClass($name), $name$index);
  7.     }
  8.     /**
  9.      * @internal
  10.      */
Environment->loadTemplate('AlivashopBundle:Main:payment.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('AlivashopBundle:Main:payment.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 = array())
  5.     {
  6.         return $this->load($name)->render($parameters);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      *
TwigEngine->render('AlivashopBundle:Main:payment.html.twig', array()) in vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php (line 45)
  1.      * {@inheritdoc}
  2.      */
  3.     public function render($name, array $parameters = array())
  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('AlivashopBundle:Main:payment.html.twig', array()) in vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php (line 234)
  1.      * @return Response A Response instance
  2.      */
  3.     protected function render($view, array $parameters = array(), 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.');
  11.         }
Controller->render('AlivashopBundle:Main:payment.html.twig') in src/AlivashopBundle/Controller/MainController.php (line 48)
  1.         return $this->render('AlivashopBundle:Main:delivery.html.twig');
  2.     }
  3.     
  4.     public function paymentAction()
  5.     {
  6.         return $this->render('AlivashopBundle:Main:payment.html.twig');
  7.     }
  8.     
  9.     public function sendMessageAction()
  10.     {
  11.         $from $_POST['from'];
MainController->paymentAction() 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 169)
  1.     {
  2.         if (false === $this->booted) {
  3.             $this->boot();
  4.         }
  5.         return $this->getHttpKernel()->handle($request$type$catch);
  6.     }
  7.     /**
  8.      * Gets a HTTP kernel from the container.
  9.      *
Kernel->handle(object(Request)) in htdocs/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 "AlivashopBundle:Main:payment.html.twig" (looked into: /srv/data/web/vhosts/www.aliva.fr/app/Resources/views, /srv/data/web/vhosts/www.aliva.fr/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('AlivashopBundle:Main:payment.html.twig')
     (vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php:49)
  at Symfony\Bridge\Twig\TwigEngine->render('AlivashopBundle:Main:payment.html.twig', array())
     (vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php:45)
  at Symfony\Bundle\TwigBundle\TwigEngine->render('AlivashopBundle:Main:payment.html.twig', array())
     (vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:234)
  at Symfony\Bundle\FrameworkBundle\Controller\Controller->render('AlivashopBundle:Main:payment.html.twig')
     (src/AlivashopBundle/Controller/MainController.php:48)
  at AlivashopBundle\Controller\MainController->paymentAction()
     (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:169)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (htdocs/app.php:19)

[1/2] LoaderError

Twig\Error\LoaderError:
Unable to find template "AlivashopBundle:Main:payment.html.twig" (looked into: /srv/data/web/vhosts/www.aliva.fr/app/Resources/views, /srv/data/web/vhosts/www.aliva.fr/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form).

  at vendor/twig/twig/src/Loader/FilesystemLoader.php:265
  at Twig\Loader\FilesystemLoader->findTemplate('AlivashopBundle:Main:payment.html.twig')
     (vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/Loader/FilesystemLoader.php:76)
  at Symfony\Bundle\TwigBundle\Loader\FilesystemLoader->findTemplate('AlivashopBundle:Main:payment.html.twig')
     (vendor/twig/twig/src/Loader/FilesystemLoader.php:161)
  at Twig\Loader\FilesystemLoader->getCacheKey('AlivashopBundle:Main:payment.html.twig')
     (vendor/twig/twig/src/Environment.php:351)
  at Twig\Environment->getTemplateClass('AlivashopBundle:Main:payment.html.twig')
     (vendor/twig/twig/src/Environment.php:445)
  at Twig\Environment->loadTemplate('AlivashopBundle:Main:payment.html.twig')
     (vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php:125)
  at Symfony\Bridge\Twig\TwigEngine->load('AlivashopBundle:Main:payment.html.twig')
     (vendor/symfony/symfony/src/Symfony/Bridge/Twig/TwigEngine.php:49)
  at Symfony\Bridge\Twig\TwigEngine->render('AlivashopBundle:Main:payment.html.twig', array())
     (vendor/symfony/symfony/src/Symfony/Bundle/TwigBundle/TwigEngine.php:45)
  at Symfony\Bundle\TwigBundle\TwigEngine->render('AlivashopBundle:Main:payment.html.twig', array())
     (vendor/symfony/symfony/src/Symfony/Bundle/FrameworkBundle/Controller/ControllerTrait.php:234)
  at Symfony\Bundle\FrameworkBundle\Controller\Controller->render('AlivashopBundle:Main:payment.html.twig')
     (src/AlivashopBundle/Controller/MainController.php:48)
  at AlivashopBundle\Controller\MainController->paymentAction()
     (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:169)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (htdocs/app.php:19)