Exceptions
Exception
Twig\Error\ RuntimeError
Show exception properties
Twig\Error\RuntimeError {#3360 -lineno: 12 -rawMessage: "Neither the property "actualPrice" nor one of the methods "actualPrice()", "getactualPrice()", "isactualPrice()", "hasactualPrice()" or "__call()" exist and have public access in class "App\Entity\ProductOptionValue"." -source: Twig\Source {#3055 -code: """ <form name="cart" class="column" method="post" action="{{ path('app_cart_add', {id:product.id}) }}" data-action="{{ path('app_cart_add', {id:product.id}) }}" {{attributes}}>\n \t{% for message in app.flashes('cart_add_'~product.id) %}\n \t\t{{ component('Alert', {type:'success', message:message}) }}\n \t{% endfor %}\n \t{% for productOption in product.productOptions %}\n \t\t<fieldset class="row">\n \t\t\t<label class="h4" for="option-{{ productOption.id }}">{{ productOption.translate.title }}:</label>\n \t\t\t<select data-model="optionsValues[{{ productOption.id }}]" id="option-{{ productOption.id }}" name="optionsValues[{{ productOption.id }}]" {{ stimulus_action('addtocart', 'setQuantityAvailable', 'change') }}>\n \t\t\t\t{% for productOptionValue in productOption.productOptionValuesAvailables %}\n \t\t\t\t\t<option value="{{ productOptionValue.id }}">\n \t\t\t\t\t\t{{ productOptionValue.translate.title }}\n \t\t\t\t\t\t{% if productOptionValue.actualPrice %}\n \t\t\t\t\t\t\t( +\n \t\t\t\t\t\t\t{{ productOptionValue.actualPrice|number_format(2, ',', ' ') }}{{ '€' }})\n \t\t\t\t\t\t{% endif %}\n \t\t\t\t\t</option>\n \t\t\t\t{% endfor %}\n \t\t\t</select>\n \t\t</fieldset>\n \t{% endfor %}\n \t<fieldset class="row quantity">\n \t\t<label class="h4">{{ 'Quantité'|trans|raw }}</label>\n \t\t<input data-model="quantity" type="number" value="1" name="quantity" {% if computed.maxStock %}max="{{ computed.maxStock }}"{% endif %}>\n \t</fieldset>\n \t{% if product.isPromotion %}\n \t\t<div>\n \t\t\t<div class="alert secondary danger">{{ computed.displayPromotionPrice|raw }}</div>\n \t\t\t<div>\n \t\t\t\t<s>{{ computed.displayPrice|raw }}</s>\n \t\t\t</div>\n \t\t</div>\n \t{% else %}\n \t\t<div class="price">{{ computed.displayPrice|raw }}</div>\n \t{% endif %}\n \t{{ component('Action', {type: "button", attr: {type:"submit", title:"Add to cart", 'aria-label':"Add to cart", 'icon': 'ph:shopping-cart'}})}}\n </form>\n """ -name: "app/components/LivePriceProduct.html.twig" -path: "/app/templates/app/components/LivePriceProduct.html.twig" } -phpFile: "/app/vendor/twig/twig/src/Extension/CoreExtension.php" -phpLine: 1892 }
in
templates/app/components/LivePriceProduct.html.twig
(line 12)
<label class="h4" for="option-{{ productOption.id }}">{{ productOption.translate.title }}:</label><select data-model="optionsValues[{{ productOption.id }}]" id="option-{{ productOption.id }}" name="optionsValues[{{ productOption.id }}]" {{ stimulus_action('addtocart', 'setQuantityAvailable', 'change') }}>{% for productOptionValue in productOption.productOptionValuesAvailables %}<option value="{{ productOptionValue.id }}">{{ productOptionValue.translate.title }}{% if productOptionValue.actualPrice %}( +{{ productOptionValue.actualPrice|number_format(2, ',', ' ') }}{{ '€' }}){% endif %}</option>{% endfor %}
in
var/cache/dev/twig/da/daa38d212f76b421788966bdf91caa3e.php
::
getAttribute
(line 107)
// line 11yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, $context["productOptionValue"], "translate", [], "any", false, false, false, 11), "title", [], "any", false, false, false, 11), "html", null, true);yield "\t\t\t\t\t\t";// line 12if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["productOptionValue"], "actualPrice", [], "any", false, false, false, 12)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {// line 13yield "\t\t\t\t\t\t\t( +\t\t\t\t\t\t\t";// line 14yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Twig\Extension\CoreExtension']->formatNumber(CoreExtension::getAttribute($this->env, $this->source, $context["productOptionValue"], "actualPrice", [], "any", false, false, false, 14), 2, ",", " "), "html", null, true);
in
vendor/twig/twig/src/Template.php
->
doDisplay
(line 411)
$context += $this->env->getGlobals();$blocks = array_merge($this->blocks, $blocks);try {$this->ensureSecurityChecked();yield from $this->doDisplay($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($this->getSourceContext());}
in
vendor/twig/twig/src/Template.php
->
yield
(line 366)
return $this->blocks;}public function display(array $context, array $blocks = []): void{foreach ($this->yield($context, $blocks) as $data) {echo $data;}}public function render(array $context): string
in
vendor/twig/twig/src/Template.php
->
display
(line 381)
ob_start();} else {ob_start(static function () { return ''; });}try {$this->display($context);} catch (\Throwable $e) {while (ob_get_level() > $level) {ob_end_clean();}
in
vendor/symfony/ux-twig-component/src/ComponentRenderer.php
->
render
(line 77)
try {return $this->twig->loadTemplate($this->templateClasses[$template = $event->getTemplate()] ??= $this->twig->getTemplateClass($template),$template,$templateIndex,)->render($variables);} finally {$mounted = $this->componentStack->pop();$event = new PostRenderEvent($mounted);$this->dispatcher->dispatch($event);
in
vendor/symfony/ux-twig-component/src/ComponentRenderer.php
->
render
(line 56)
{if ($preRendered = $this->preCreateForRender($name, $props)) {return $preRendered;}return $this->render($this->factory->create($name, $props));}public function render(MountedComponent $mounted): string{$this->componentStack->push($mounted);
in
vendor/symfony/ux-twig-component/src/Twig/ComponentRuntime.php
->
createAndRender
(line 51)
{if ($this->renderers->has($normalized = strtolower($name))) {return $this->renderers->get($normalized)->render($props);}return $this->renderer->createAndRender($name, $props);}/*** @param array<string, mixed> $props* @param array<string, mixed> $context
in
var/cache/dev/twig/2c/2c16f56c53648ff39f8f276cb19304bd.php
->
render
(line 159)
\t\t\t\t\t\t";// line 30if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 30, $this->source); })()), "available", [], "any", false, false, false, 30)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {// line 31yield "\t\t\t\t\t\t\t";yield $this->env->getRuntime('Symfony\UX\TwigComponent\Twig\ComponentRuntime')->render("LivePriceProduct", ["product" => (isset($context["product"]) || array_key_exists("product", $context) ? $context["product"] : (function () { throw new RuntimeError('Variable "product" does not exist.', 31, $this->source); })())]);yield "\t\t\t\t\t\t";}// line 33yield "\t\t\t\t\t\t<div class=\"paragraph column\">
in
vendor/twig/twig/src/Template.php
->
block_content
(line 456)
}if (null !== $template) {try {$template->ensureSecurityChecked();yield from $template->$block($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($template->getSourceContext());}
in
var/cache/dev/twig/23/23f8a64520ca16eb30dc0c408decab07.php
->
yieldBlock
(line 102)
\t\t\t";// line 24yield from $this->unwrap()->yieldBlock('infos', $context, $blocks);// line 27yield "\t\t\t";yield from $this->unwrap()->yieldBlock('content', $context, $blocks);// line 28yield "\t\t\t";yield from $this->unwrap()->yieldBlock('footer', $context, $blocks);// line 31yield "\t\t</div>
in
vendor/twig/twig/src/Template.php
->
doDisplay
(line 411)
$context += $this->env->getGlobals();$blocks = array_merge($this->blocks, $blocks);try {$this->ensureSecurityChecked();yield from $this->doDisplay($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($this->getSourceContext());}
in
var/cache/dev/twig/2c/2c16f56c53648ff39f8f276cb19304bd.php
->
yield
(line 54)
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "app/product/show.html.twig"));$this->parent = $this->load("base.html.twig", 1);yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in
vendor/twig/twig/src/Template.php
->
doDisplay
(line 411)
$context += $this->env->getGlobals();$blocks = array_merge($this->blocks, $blocks);try {$this->ensureSecurityChecked();yield from $this->doDisplay($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($this->getSourceContext());}
in
vendor/twig/twig/src/Template.php
->
yield
(line 366)
return $this->blocks;}public function display(array $context, array $blocks = []): void{foreach ($this->yield($context, $blocks) as $data) {echo $data;}}public function render(array $context): string
in
vendor/twig/twig/src/Template.php
->
display
(line 381)
ob_start();} else {ob_start(static 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 51)
yield from $this->template->yieldBlock($name, $context);}public function render(array $context = []): string{return $this->template->render($context);}/*** @return void*/
in
vendor/twig/twig/src/Environment.php
->
render
(line 333)
* @throws SyntaxError When an error occurred during compilation* @throws RuntimeError When an error occurred during rendering*/public function render($name, array $context = []): string{return $this->load($name)->render($context);}/*** Displays a template.*
in
vendor/symfony/framework-bundle/Controller/AbstractController.php
->
render
(line 467)
if (null !== $block) {return $this->container->get('twig')->load($view)->renderBlock($block, $parameters);}return $this->container->get('twig')->render($view, $parameters);}private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response{$content = $this->doRenderView($view, $block, $parameters, $method);
in
vendor/symfony/framework-bundle/Controller/AbstractController.php
->
doRenderView
(line 472)
return $this->container->get('twig')->render($view, $parameters);}private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response{$content = $this->doRenderView($view, $block, $parameters, $method);$response ??= new Response();if (200 === $response->getStatusCode()) {foreach ($parameters as $v) {if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
in
vendor/symfony/framework-bundle/Controller/AbstractController.php
->
doRender
(line 284)
* If an invalid form is found in the list of parameters, a 422 status code is returned.* Forms found in parameters are auto-cast to form views.*/protected function render(string $view, array $parameters = [], ?Response $response = null): Response{return $this->doRender($view, null, $parameters, $response, __FUNCTION__);}/*** Renders a block in a view.*
}#[Route('/{_locale<%supported_locales%>}/product/show/{id}-{slug}', name: 'app_product_show', options: ["sitemap" => true])]public function show(Product $product): Response{return $this->render('app/product/show.html.twig', ['product' => $product]);}}
in
vendor/symfony/http-kernel/HttpKernel.php
->
show
(line 183)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response, $event);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 76)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try {return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {if ($e instanceof \Error && !$this->handleAllThrowables) {throw $e;}
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 193)
if (!$this->handlingHttpCache) {$this->resetServices = true;}try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
) {}public function run(): int{$response = $this->kernel->handle($this->request);if (Kernel::VERSION_ID >= 60400) {$response->send(false);if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in
vendor/autoload_runtime.php
->
run
(line 32)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Logs
| Level | Channel | Message |
|---|---|---|
| INFO 16:07:50 | deprecation |
User Deprecated: The Liip\ImagineBundle\Templating\FilterTrait trait is deprecated since version 2.7 and will be removed in 3.0; use Twig instead. {
"exception": {}
}
|
| INFO 16:07:50 | deprecation |
User Deprecated: The Liip\ImagineBundle\Templating\FilterExtension class is deprecated since version 2.7 and will be removed in 3.0; configure "liip_imagine.twig.mode" to "lazy" instead. {
"exception": {}
}
|
| INFO 16:07:50 | deprecation |
User Deprecated: Class "Doctrine\ORM\Proxy\Autoloader" is deprecated. Use native lazy objects instead. (Autoloader.php:74 called by DoctrineBundle.php:136, https://github.com/doctrine/orm/pull/12005, package doctrine/orm) {
"exception": {}
}
|
| INFO 16:07:51 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "573120"
},
"request_uri": "https://socle-sf74.preprod.sercopw.fr/_profiler/573120?panel=exception&type=request",
"method": "GET"
}
|
Stack Trace
|
RuntimeError
|
|---|
Twig\Error\RuntimeError:
Neither the property "actualPrice" nor one of the methods "actualPrice()", "getactualPrice()", "isactualPrice()", "hasactualPrice()" or "__call()" exist and have public access in class "App\Entity\ProductOptionValue" in "app/components/LivePriceProduct.html.twig" at line 12.
at templates/app/components/LivePriceProduct.html.twig:12
at Twig\Extension\CoreExtension::getAttribute()
(var/cache/dev/twig/da/daa38d212f76b421788966bdf91caa3e.php:107)
at __TwigTemplate_ee76bec3bb389da915746c0f17d21a9f->doDisplay()
(vendor/twig/twig/src/Template.php:411)
at Twig\Template->yield()
(vendor/twig/twig/src/Template.php:366)
at Twig\Template->display()
(vendor/twig/twig/src/Template.php:381)
at Twig\Template->render()
(vendor/symfony/ux-twig-component/src/ComponentRenderer.php:77)
at Symfony\UX\TwigComponent\ComponentRenderer->render()
(vendor/symfony/ux-twig-component/src/ComponentRenderer.php:56)
at Symfony\UX\TwigComponent\ComponentRenderer->createAndRender()
(vendor/symfony/ux-twig-component/src/Twig/ComponentRuntime.php:51)
at Symfony\UX\TwigComponent\Twig\ComponentRuntime->render()
(var/cache/dev/twig/2c/2c16f56c53648ff39f8f276cb19304bd.php:159)
at __TwigTemplate_5d3848925efc54918ab729174261555f->block_content()
(vendor/twig/twig/src/Template.php:456)
at Twig\Template->yieldBlock()
(var/cache/dev/twig/23/23f8a64520ca16eb30dc0c408decab07.php:102)
at __TwigTemplate_e6fb805884017bc5f9d81b5af55e1ffa->doDisplay()
(vendor/twig/twig/src/Template.php:411)
at Twig\Template->yield()
(var/cache/dev/twig/2c/2c16f56c53648ff39f8f276cb19304bd.php:54)
at __TwigTemplate_5d3848925efc54918ab729174261555f->doDisplay()
(vendor/twig/twig/src/Template.php:411)
at Twig\Template->yield()
(vendor/twig/twig/src/Template.php:366)
at Twig\Template->display()
(vendor/twig/twig/src/Template.php:381)
at Twig\Template->render()
(vendor/twig/twig/src/TemplateWrapper.php:51)
at Twig\TemplateWrapper->render()
(vendor/twig/twig/src/Environment.php:333)
at Twig\Environment->render()
(vendor/symfony/framework-bundle/Controller/AbstractController.php:467)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRenderView()
(vendor/symfony/framework-bundle/Controller/AbstractController.php:472)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRender()
(vendor/symfony/framework-bundle/Controller/AbstractController.php:284)
at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render()
(src/Controller/ProductController.php:34)
at App\Controller\ProductController->show()
(vendor/symfony/http-kernel/HttpKernel.php:183)
at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
(vendor/symfony/http-kernel/HttpKernel.php:76)
at Symfony\Component\HttpKernel\HttpKernel->handle()
(vendor/symfony/http-kernel/Kernel.php:193)
at Symfony\Component\HttpKernel\Kernel->handle()
(vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
(vendor/autoload_runtime.php:32)
at require_once('/app/vendor/autoload_runtime.php')
(public/index.php:5)
|