Exceptions
Exception
Twig\Error\ RuntimeError
{
"@context": "http://schema.org/",
"@type": "Product",
"name": "{{ variant.name }}",
{% if variant.images|length > 0 %}
"image": "{{ variant.imagesByType('image_product_main').first().path|imagine_filter('sylius_shop_product_original') }}",
{% endif %}
{% if variant.description is not empty %}
"description": "{{ variant.description|raw }}",
{% elseif variant.product.description is not empty %}
"description": "{{ variant.product.description|raw }}",
in
vendor/twig/twig/src/Environment.php(418) : eval()'d code
twig_get_attribute
(line 1910)
in
vendor/twig/twig/src/Template.php
->
block_content
(line 182)
throw new \LogicException('A block must be a method on a \Twig\Template instance.');
}
if (null !== $template) {
try {
$template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
in
vendor/twig/twig/src/Environment.php(418) : eval()'d code
->
displayBlock
(line 371)
in
vendor/twig/twig/src/Template.php
->
doDisplay
(line 405)
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
in
vendor/twig/twig/src/Template.php
->
displayWithErrorHandling
(line 378)
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
in
vendor/twig/twig/src/Environment.php(418) : eval()'d code
->
display
(line 56)
in
vendor/twig/twig/src/Template.php
->
doDisplay
(line 405)
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
in
vendor/twig/twig/src/Template.php
->
displayWithErrorHandling
(line 378)
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
in
vendor/twig/twig/src/Template.php
->
display
(line 390)
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
in
vendor/twig/twig/src/TemplateWrapper.php
->
render
(line 45)
*/
public function render(array $context = []): string
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
return $this->template->render($context, \func_get_args()[1] ?? []);
}
/**
* Displays the template.
*
in
vendor/twig/twig/src/Environment.php
->
render
(line 318)
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function render($name, array $context = [])
{
return $this->load($name)->render($context);
}
/**
* Displays a template.
*
in
vendor/symfony/framework-bundle/Controller/AbstractController.php
->
render
(line 258)
{
if (!$this->container->has('twig')) {
throw new \LogicException('You cannot use the "renderView" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
}
return $this->container->get('twig')->render($view, $parameters);
}
/**
* Renders a view.
*/
in
vendor/symfony/framework-bundle/Controller/AbstractController.php
->
renderView
(line 266)
/**
* Renders a view.
*/
protected function render(string $view, array $parameters = [], Response $response = null): Response
{
$content = $this->renderView($view, $parameters);
if (null === $response) {
$response = new Response();
}
'meter' => $meter,
'isTissu' => $tissu,
'isCarteKdo' => $carteKdo,
'userFavoriteShopStock' => $userFavoriteShopStock
]);
}
public function accessoriesAjaxAction(
Request $request,
in
vendor/symfony/http-kernel/HttpKernel.php
->
showAction
(line 163)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 75)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 202)
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$_SERVER['HTTPS'] = 'on';
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Logs
No log messages
Stack Trace
RuntimeError
|
---|
Twig\Error\RuntimeError: Impossible to access an attribute ("path") on a boolean variable (""). at themes/webapicTheme/templates/site_product_show.html.twig:783 at twig_get_attribute() (vendor/twig/twig/src/Environment.php(418) : eval()'d code:1910) at __TwigTemplate_80d8f2407e438e920a61630beacbdd16dd08ea6d28efb6fa15c749f063c94b5b->block_content() (vendor/twig/twig/src/Template.php:182) at Twig\Template->displayBlock() (vendor/twig/twig/src/Environment.php(418) : eval()'d code:371) at __TwigTemplate_a7c51692e4192b84cd0657536425ac82c19c19e804357f2d19f6de3526505e61->doDisplay() (vendor/twig/twig/src/Template.php:405) at Twig\Template->displayWithErrorHandling() (vendor/twig/twig/src/Template.php:378) at Twig\Template->display() (vendor/twig/twig/src/Environment.php(418) : eval()'d code:56) at __TwigTemplate_80d8f2407e438e920a61630beacbdd16dd08ea6d28efb6fa15c749f063c94b5b->doDisplay() (vendor/twig/twig/src/Template.php:405) at Twig\Template->displayWithErrorHandling() (vendor/twig/twig/src/Template.php:378) at Twig\Template->display() (vendor/twig/twig/src/Template.php:390) at Twig\Template->render() (vendor/twig/twig/src/TemplateWrapper.php:45) at Twig\TemplateWrapper->render() (vendor/twig/twig/src/Environment.php:318) at Twig\Environment->render() (vendor/symfony/framework-bundle/Controller/AbstractController.php:258) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView() (vendor/symfony/framework-bundle/Controller/AbstractController.php:266) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render() (src/Controller/ProductController.php:310) at App\Controller\ProductController->showAction() (vendor/symfony/http-kernel/HttpKernel.php:163) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:31) |