Error 500 Internal Server Error

GET https://socle-sf74.preprod.sercopw.fr/fr/product/show/162-produit-8-1

Forwarded to ErrorController (aebd8a)

Exceptions

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.

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
}
  1. <label class="h4" for="option-{{ productOption.id }}">{{ productOption.translate.title }}:</label>
  2. <select data-model="optionsValues[{{ productOption.id }}]" id="option-{{ productOption.id }}" name="optionsValues[{{ productOption.id }}]" {{ stimulus_action('addtocart', 'setQuantityAvailable', 'change') }}>
  3. {% for productOptionValue in productOption.productOptionValuesAvailables %}
  4. <option value="{{ productOptionValue.id }}">
  5. {{ productOptionValue.translate.title }}
  6. {% if productOptionValue.actualPrice %}
  7. ( +
  8. {{ productOptionValue.actualPrice|number_format(2, ',', ' ') }}{{ '€' }})
  9. {% endif %}
  10. </option>
  11. {% endfor %}
  1. // line 11
  2. yield $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);
  3. yield "
  4. \t\t\t\t\t\t";
  5. // line 12
  6. if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, $context["productOptionValue"], "actualPrice", [], "any", false, false, false, 12)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
  7. // line 13
  8. yield "\t\t\t\t\t\t\t( +
  9. \t\t\t\t\t\t\t";
  10. // line 14
  11. yield $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)
  1. $context += $this->env->getGlobals();
  2. $blocks = array_merge($this->blocks, $blocks);
  3. try {
  4. $this->ensureSecurityChecked();
  5. yield from $this->doDisplay($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($this->getSourceContext());
  9. }
  1. return $this->blocks;
  2. }
  3. public function display(array $context, array $blocks = []): void
  4. {
  5. foreach ($this->yield($context, $blocks) as $data) {
  6. echo $data;
  7. }
  8. }
  9. public function render(array $context): string
in vendor/twig/twig/src/Template.php -> display (line 381)
  1. ob_start();
  2. } else {
  3. ob_start(static function () { return ''; });
  4. }
  5. try {
  6. $this->display($context);
  7. } catch (\Throwable $e) {
  8. while (ob_get_level() > $level) {
  9. ob_end_clean();
  10. }
  1. try {
  2. return $this->twig->loadTemplate(
  3. $this->templateClasses[$template = $event->getTemplate()] ??= $this->twig->getTemplateClass($template),
  4. $template,
  5. $templateIndex,
  6. )->render($variables);
  7. } finally {
  8. $mounted = $this->componentStack->pop();
  9. $event = new PostRenderEvent($mounted);
  10. $this->dispatcher->dispatch($event);
  1. {
  2. if ($preRendered = $this->preCreateForRender($name, $props)) {
  3. return $preRendered;
  4. }
  5. return $this->render($this->factory->create($name, $props));
  6. }
  7. public function render(MountedComponent $mounted): string
  8. {
  9. $this->componentStack->push($mounted);
  1. {
  2. if ($this->renderers->has($normalized = strtolower($name))) {
  3. return $this->renderers->get($normalized)->render($props);
  4. }
  5. return $this->renderer->createAndRender($name, $props);
  6. }
  7. /**
  8. * @param array<string, mixed> $props
  9. * @param array<string, mixed> $context
  1. \t\t\t\t\t\t";
  2. // line 30
  3. if ((($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)) {
  4. // line 31
  5. yield "\t\t\t\t\t\t\t";
  6. 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); })())]);
  7. yield "
  8. \t\t\t\t\t\t";
  9. }
  10. // line 33
  11. yield "\t\t\t\t\t\t<div class=\"paragraph column\">
in vendor/twig/twig/src/Template.php -> block_content (line 456)
  1. }
  2. if (null !== $template) {
  3. try {
  4. $template->ensureSecurityChecked();
  5. yield from $template->$block($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($template->getSourceContext());
  9. }
  1. \t\t\t";
  2. // line 24
  3. yield from $this->unwrap()->yieldBlock('infos', $context, $blocks);
  4. // line 27
  5. yield "\t\t\t";
  6. yield from $this->unwrap()->yieldBlock('content', $context, $blocks);
  7. // line 28
  8. yield "\t\t\t";
  9. yield from $this->unwrap()->yieldBlock('footer', $context, $blocks);
  10. // line 31
  11. yield "\t\t</div>
in vendor/twig/twig/src/Template.php -> doDisplay (line 411)
  1. $context += $this->env->getGlobals();
  2. $blocks = array_merge($this->blocks, $blocks);
  3. try {
  4. $this->ensureSecurityChecked();
  5. yield from $this->doDisplay($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($this->getSourceContext());
  9. }
  1. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "app/product/show.html.twig"));
  3. $this->parent = $this->load("base.html.twig", 1);
  4. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  5. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  6. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in vendor/twig/twig/src/Template.php -> doDisplay (line 411)
  1. $context += $this->env->getGlobals();
  2. $blocks = array_merge($this->blocks, $blocks);
  3. try {
  4. $this->ensureSecurityChecked();
  5. yield from $this->doDisplay($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($this->getSourceContext());
  9. }
  1. return $this->blocks;
  2. }
  3. public function display(array $context, array $blocks = []): void
  4. {
  5. foreach ($this->yield($context, $blocks) as $data) {
  6. echo $data;
  7. }
  8. }
  9. public function render(array $context): string
in vendor/twig/twig/src/Template.php -> display (line 381)
  1. ob_start();
  2. } else {
  3. ob_start(static function () { return ''; });
  4. }
  5. try {
  6. $this->display($context);
  7. } catch (\Throwable $e) {
  8. while (ob_get_level() > $level) {
  9. ob_end_clean();
  10. }
  1. yield from $this->template->yieldBlock($name, $context);
  2. }
  3. public function render(array $context = []): string
  4. {
  5. return $this->template->render($context);
  6. }
  7. /**
  8. * @return void
  9. */
  1. * @throws SyntaxError When an error occurred during compilation
  2. * @throws RuntimeError When an error occurred during rendering
  3. */
  4. public function render($name, array $context = []): string
  5. {
  6. return $this->load($name)->render($context);
  7. }
  8. /**
  9. * Displays a template.
  10. *
  1. if (null !== $block) {
  2. return $this->container->get('twig')->load($view)->renderBlock($block, $parameters);
  3. }
  4. return $this->container->get('twig')->render($view, $parameters);
  5. }
  6. private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response
  7. {
  8. $content = $this->doRenderView($view, $block, $parameters, $method);
  1. return $this->container->get('twig')->render($view, $parameters);
  2. }
  3. private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response
  4. {
  5. $content = $this->doRenderView($view, $block, $parameters, $method);
  6. $response ??= new Response();
  7. if (200 === $response->getStatusCode()) {
  8. foreach ($parameters as $v) {
  9. if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
  1. * If an invalid form is found in the list of parameters, a 422 status code is returned.
  2. * Forms found in parameters are auto-cast to form views.
  3. */
  4. protected function render(string $view, array $parameters = [], ?Response $response = null): Response
  5. {
  6. return $this->doRender($view, null, $parameters, $response, __FUNCTION__);
  7. }
  8. /**
  9. * Renders a block in a view.
  10. *
AbstractController->render() in src/Controller/ProductController.php (line 34)
  1. }
  2. #[Route('/{_locale<%supported_locales%>}/product/show/{id}-{slug}', name: 'app_product_show', options: ["sitemap" => true])]
  3. public function show(Product $product): Response
  4. {
  5. return $this->render('app/product/show.html.twig', [
  6. 'product' => $product
  7. ]);
  8. }
  9. }
  1. $this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
  2. $controller = $event->getController();
  3. $arguments = $event->getArguments();
  4. // call controller
  5. $response = $controller(...$arguments);
  6. // view
  7. if (!$response instanceof Response) {
  8. $event = new ViewEvent($this, $request, $type, $response, $event);
  9. $this->dispatcher->dispatch($event, KernelEvents::VIEW);
  1. $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2. $this->requestStack->push($request);
  3. $response = null;
  4. try {
  5. return $response = $this->handleRaw($request, $type);
  6. } catch (\Throwable $e) {
  7. if ($e instanceof \Error && !$this->handleAllThrowables) {
  8. throw $e;
  9. }
  1. if (!$this->handlingHttpCache) {
  2. $this->resetServices = true;
  3. }
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
  1. ) {
  2. }
  3. public function run(): int
  4. {
  5. $response = $this->kernel->handle($this->request);
  6. if (Kernel::VERSION_ID >= 60400) {
  7. $response->send(false);
  8. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in vendor/autoload_runtime.php -> run (line 32)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/app/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return function (array $context) {
  5. return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

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)