* {@inheritdoc}
*/
public function render($name, array $parameters = array())
{
try {
return parent::render($name, $parameters);
} catch (Error $e) {
if ($name instanceof TemplateReference && !method_exists($e, 'setSourceContext')) {
try {
// try to get the real name of the template where the error occurred
$name = $e->getTemplateName();
* @return Response A Response instance
*/
protected function render($view, array $parameters = array(), Response $response = null)
{
if ($this->container->has('templating')) {
$content = $this->container->get('templating')->render($view, $parameters);
} elseif ($this->container->has('twig')) {
$content = $this->container->get('twig')->render($view, $parameters);
} else {
throw new \LogicException('You can not use the "render" method if the Templating Component or the Twig Bundle are not available.');
}
$this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = \call_user_func_array($controller, $arguments);
// view
if (!$response instanceof Response) {
$event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
$this->dispatcher->dispatch(KernelEvents::VIEW, $event);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
//$kernel = new AppCache($kernel);
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
* {@inheritdoc}
*/
public function render($name, array $parameters = array())
{
try {
return parent::render($name, $parameters);
} catch (Error $e) {
if ($name instanceof TemplateReference && !method_exists($e, 'setSourceContext')) {
try {
// try to get the real name of the template where the error occurred
$name = $e->getTemplateName();
* @return Response A Response instance
*/
protected function render($view, array $parameters = array(), Response $response = null)
{
if ($this->container->has('templating')) {
$content = $this->container->get('templating')->render($view, $parameters);
} elseif ($this->container->has('twig')) {
$content = $this->container->get('twig')->render($view, $parameters);
} else {
throw new \LogicException('You can not use the "render" method if the Templating Component or the Twig Bundle are not available.');
}
$this->dispatcher->dispatch(KernelEvents::CONTROLLER_ARGUMENTS, $event);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = \call_user_func_array($controller, $arguments);
// view
if (!$response instanceof Response) {
$event = new GetResponseForControllerResultEvent($this, $request, $type, $response);
$this->dispatcher->dispatch(KernelEvents::VIEW, $event);
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
//$kernel = new AppCache($kernel);
// When using the HttpCache, you need to call the method in your front controller instead of relying on the configuration parameter
//Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
No log messages
[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) |