Error 500 Internal Server Error

GET https://dvz.all.baks.dev/catalog/westlake/westlake_z507_zupersnow/model

Forwarded to ErrorController (b43dee)

Exceptions

An exception has been thrown during the rendering of a template ("Warning: Attempt to read property "field_public" on array") in @App/products-product/Resources/view/public/model/pc/includes/model.html.twig at line 16.

Exceptions 2

Twig\Error\ RuntimeError

Show exception properties
Twig\Error\RuntimeError {#1174
  -lineno: 16
  -rawMessage: "An exception has been thrown during the rendering of a template ("Warning: Attempt to read property "field_public" on array")."
  -source: Twig\Source {#1160
    -code: """
      {# @var card \BaksDev\Products\Product\Repository\ProductModel\ProductModelResult #}\n
      \n
      {# Диапазон цен модели #}\n
      {% set min_price = null %}\n
      \t{% if card.minPrice is not null %}\n
              {% set min_price = user_profile_discount(card.minPrice) ?: card.minPrice %}\n
          {% endif %}\n
      \n
      {# Обложка категории #}\n
      {% set category_cover = '/assets/img/blank.svg' %}\n
      \t{% if card.categoryCoverCdn is not null %}\n
              {% set category_cover = cdn_image_path(card.categoryCoverDir, card.categoryCoverExt, card.categoryCoverCdn) %}\n
          {% endif %}\n
      \n
      {# Свойства продукта #}\n
      {% set product_fields = card.categorySectionField %}\n
      \n
      <section\n
              class="container py-5"> {# Модальное окно - изображение продукта #}\n
          {% include Template('@products-product/public/'~baks_settings.device~'/images_modal.html.twig') with {card} only %}\n
      \n
          <div class="d-flex justify-content-between">\n
              <h2 class="fs-24 text-uppercase fw-bold">\n
                  {{ card.productName }}\n
              </h2>\n
          </div>\n
      \n
          {{ include(_self|replace({ "model.html.twig" : "breadcrumb.html.twig" })) }}\n
      \n
          {# ОСНОВНОЙ КОНТЕНТ СТРАНИЦЫ #}\n
          <div class="row mb-5">\n
              <div class="col-4">\n
                  {% include Template('@products-product/public/'~baks_settings.device~'/images_carousel.html.twig') with {card} only %}\n
              </div>\n
      \n
              <div class="col-5">\n
      \n
                  <img class="mb-3" src="{{ category_cover }}" style="width: 220px;" alt="{{ card.categoryName }}">\n
      \n
                  <p class="fs-24 fw-bold mb-3">\n
                      {% if min_price %}\n
                          от\n
                          {{ money(min_price) }}\n
                      {% else %}\n
                          цена по запросу\n
                      {% endif %}\n
                  </p>\n
      \n
                  {% include Template('@products-product/public/'~baks_settings.device~'/properties_public.html.twig') with {card} only %}\n
      \n
              </div>\n
      \n
              <div class="col-3">\n
                  <div style="height:400px; background: url(/assets/white-sign/img/ad2.png) no-repeat; background-size: contain"></div>\n
              </div>\n
      \n
          </div>\n
      \n
          <div class="row">\n
      \n
              <div\n
                      class="col-9">\n
      \n
                  {# PILS #}\n
                  <ul class="list-group list-group-horizontal productCadr-tabs-gap mb-5" id="pills-tab">\n
                      <li class="list-group-item border-0 p-0">\n
                          <button class="btn px-3 py-2 fw-bold rounded-5 active productCardTabs text-decoration-underline"\n
                                  id="pills-description-tab" data-bs-toggle="pill" data-bs-target="#pills-description"\n
                                  type="button" aria-controls="pills-description" aria-selected="true">Описание\n
                          </button>\n
                      </li>\n
      \n
                      <li class="list-group-item border-0 p-0">\n
                          <button class="btn px-3 py-2 fw-bold rounded-5 productCardTabs text-decoration-underline"\n
                                  id="pills-props-tab" data-bs-toggle="pill" data-bs-target="#pills-props" type="button"\n
                                  aria-controls="pills-props" aria-selected="false">Характеристики\n
                          </button>\n
                      </li>\n
      \n
                      <li class="list-group-item border-0 p-0">\n
                          <button class="btn px-3 py-2 fw-bold rounded-5 productCardTabs text-decoration-underline"\n
                                  id="pills-reviews-tab" data-bs-toggle="pill" data-bs-target="#pills-reviews" type="button"\n
                                  aria-controls="pills-reviews" aria-selected="false">Отзывы\n
                          </button>\n
                      </li>\n
                  </ul>\n
      \n
                  {# TABS #}\n
                  <div class="tab-content" id="pills-tabContent" {# style="min-height: 460px;" #}>\n
      \n
                      <div class="tab-pane fade show active text-secondary" id="pills-description"\n
                           aria-labelledby="pills-description-tab" tabindex="0">\n
                          {{ include(_self|replace({ "model.html.twig" : "model-description.html.twig" }), {card}, with_context = false) }}\n
                      </div>\n
      \n
                      <div class="tab-pane fade" id="pills-props" aria-labelledby="pills-props-tab"\n
                           tabindex="0">\n
                          {% include Template('@products-product/public/'~baks_settings.device~'/properties_all.html.twig') with {card} only %}\n
                      </div>\n
      \n
                      {# Отзывы #}\n
                      <div class="tab-pane fade" id="pills-reviews" aria-labelledby="pills-reviews-tab" tabindex="0">\n
                          {{ include(Template('@products-review:public/_includes/pc/reviews.section.html.twig')) }}\n
                      </div>\n
      \n
                  </div>\n
      \n
                  {{ include(_self|replace({ "model.html.twig" : "alternatives/alternatives.html.twig" }), {card}, with_context = false) }}\n
      \n
                  <div class="mb-0 pt-3" id="collapseRead">\n
                      {{ card.productDescription|raw }}\n
                  </div>\n
      \n
              </div>\n
      \n
              <div class="col-3">\n
      \n
                  {{ render_one_best_seller(card.categoryId) }}\n
      \n
                  {% include Template('/public/'~baks_settings.device~'/includes/banners/ad-banner-sm.html.twig') %}\n
                  {% include Template('/public/'~baks_settings.device~'/includes/banners/ad-banner-sm.html.twig') %}\n
              </div>\n
      \n
          </div>\n
      \n
      </section>\n
      """
    -name: "@App/products-product/Resources/view/public/model/pc/includes/model.html.twig"
    -path: "/home/dvz.all.baks.dev/src/products-product/Resources/view/public/model/pc/includes/model.html.twig"
  }
  -phpFile: "/home/dvz.all.baks.dev/vendor/twig/twig/src/Template.php"
  -phpLine: 416
}
  1. {% if card.categoryCoverCdn is not null %}
  2. {% set category_cover = cdn_image_path(card.categoryCoverDir, card.categoryCoverExt, card.categoryCoverCdn) %}
  3. {% endif %}
  4. {# Свойства продукта #}
  5. {% set product_fields = card.categorySectionField %}
  6. <section
  7. class="container py-5"> {# Модальное окно - изображение продукта #}
  8. {% include Template('@products-product/public/'~baks_settings.device~'/images_modal.html.twig') with {card} only %}
  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 373)
  1. ob_start();
  2. } else {
  3. ob_start(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. if ($isSandboxed) {
  2. $loaded->unwrap()->checkSecurity();
  3. }
  4. return $loaded->render($variables);
  5. } finally {
  6. if ($isSandboxed && !$alreadySandboxed) {
  7. $sandbox->disableSandbox();
  8. }
  9. }
  1. <main>
  2. ";
  3. // line 7
  4. yield Twig\Extension\CoreExtension::include($this->env, $context, Twig\Extension\CoreExtension::replace($this->getTemplateName(), ["content.html.twig" => "includes/model.html.twig"]));
  5. yield "
  6. ";
  7. // line 10
  8. yield " ";
in vendor/twig/twig/src/Template.php -> doDisplay (line 402)
  1. {
  2. $context += $this->env->getGlobals();
  3. $blocks = array_merge($this->blocks, $blocks);
  4. try {
  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 373)
  1. ob_start();
  2. } else {
  3. ob_start(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. if ($isSandboxed) {
  2. $loaded->unwrap()->checkSecurity();
  3. }
  4. return $loaded->render($variables);
  5. } finally {
  6. if ($isSandboxed && !$alreadySandboxed) {
  7. $sandbox->disableSandbox();
  8. }
  9. }
  1. // line 92
  2. yield "
  3. ";
  4. // line 93
  5. yield Twig\Extension\CoreExtension::include($this->env, $context, Twig\Extension\CoreExtension::replace($this->getTemplateName(), ["template.html.twig" => (CoreExtension::getAttribute($this->env, $this->source, (isset($context["baks_settings"]) || array_key_exists("baks_settings", $context) ? $context["baks_settings"] : (function () { throw new RuntimeError('Variable "baks_settings" does not exist.', 93, $this->source); })()), "device", [], "any", false, false, false, 93) . "/content.html.twig")]));
  6. yield "
  7. ";
  8. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in vendor/twig/twig/src/Template.php -> block_content (line 446)
  1. throw new \LogicException('A block must be a method on a \Twig\Template instance.');
  2. }
  3. if (null !== $template) {
  4. try {
  5. yield from $template->$block($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($template->getSourceContext());
  9. }
  1. yield from $this->load($this->extensions['BaksDev\Core\Twig\TemplateExtension']->extends((("@products-category:public/navbar/" . CoreExtension::getAttribute($this->env, $this->source, (isset($context["baks_settings"]) || array_key_exists("baks_settings", $context) ? $context["baks_settings"] : (function () { throw new RuntimeError('Variable "baks_settings" does not exist.', 173, $this->source); })()), "device", [], "any", false, false, false, 173)) . "/navbar.html.twig")), 173)->unwrap()->yield($context);
  2. // line 174
  3. yield "
  4. ";
  5. // line 175
  6. yield from $this->unwrap()->yieldBlock('content', $context, $blocks);
  7. // line 178
  8. yield "
  9. ";
  10. // line 179
  11. yield from $this->unwrap()->yieldBlock('footer', $context, $blocks);
in vendor/twig/twig/src/Template.php -> doDisplay (line 402)
  1. {
  2. $context += $this->env->getGlobals();
  3. $blocks = array_merge($this->blocks, $blocks);
  4. try {
  5. yield from $this->doDisplay($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($this->getSourceContext());
  9. }
  1. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@App/products-product/Resources/view/public/model/template.html.twig"));
  2. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  3. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@App/products-product/Resources/view/public/model/template.html.twig"));
  4. yield from $this->getParent($context)->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 402)
  1. {
  2. $context += $this->env->getGlobals();
  3. $blocks = array_merge($this->blocks, $blocks);
  4. try {
  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 373)
  1. ob_start();
  2. } else {
  3. ob_start(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. $ModuleTemplate = '@App';
  2. if(file_exists($this->project_dir.'/src/'.$module.'/Resources/view/'.$fileName))
  3. {
  4. $view = $ModuleTemplate.'/'.$module.'/Resources/view/'.$fileName;
  5. $content = $this->environment->render($view, $parameters);
  6. }
  7. // Пробуем определить файл шаблона по умолчанию template.html.twig
  8. elseif(file_exists($this->project_dir.'/src/'.$module.'/Resources/view/'.$fileDefault))
  9. {
  10. $view = $ModuleTemplate.'/'.$module.'/Resources/view/'.$fileDefault;
  1. $ProductsReviews = $AllReviewsRepository
  2. ->filter($statusDTO)
  3. ->product($info->getProduct())
  4. ->findPaginator();
  5. return $this->render([
  6. 'card' => $card,
  7. 'reviews' => $ProductsReviews,
  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 29)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/home/dvz.all.baks.dev/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. // if(
  6. // true === in_array($_SERVER['REMOTE_ADDR'], [

ErrorException

Warning: Attempt to read property "field_public" on array

  1. if(null === current($sectionFields))
  2. {
  3. return null;
  4. }
  5. return array_filter($sectionFields, static fn($n) => $n->field_public === true);
  6. }
  7. public function getCategoryThreshold(): ?int
  8. {
  9. return $this->category_threshold;
ProductModelResult::{closure:BaksDev\Products\Product\Repository\ProductModel\ProductModelResult::getCategorySectionField():207}()
  1. if(null === current($sectionFields))
  2. {
  3. return null;
  4. }
  5. return array_filter($sectionFields, static fn($n) => $n->field_public === true);
  6. }
  7. public function getCategoryThreshold(): ?int
  8. {
  9. return $this->category_threshold;
in vendor/twig/twig/src/Extension/CoreExtension.php -> getCategorySectionField (line 1919)
  1. }
  2. // Some objects throw exceptions when they have __call, and the method we try
  3. // to call is not supported. If ignoreStrictCheck is true, we should return null.
  4. try {
  5. $ret = $object->$method(...$arguments);
  6. } catch (\BadMethodCallException $e) {
  7. if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
  8. return;
  9. }
  10. throw $e;
  1. }
  2. // line 14
  3. yield "
  4. ";
  5. // line 16
  6. $context["product_fields"] = CoreExtension::getAttribute($this->env, $this->source, (isset($context["card"]) || array_key_exists("card", $context) ? $context["card"] : (function () { throw new RuntimeError('Variable "card" does not exist.', 16, $this->source); })()), "categorySectionField", [], "any", false, false, false, 16);
  7. // line 17
  8. yield "
  9. <section
  10. class=\"container py-5\"> ";
  11. // line 20
in vendor/twig/twig/src/Template.php -> doDisplay (line 402)
  1. {
  2. $context += $this->env->getGlobals();
  3. $blocks = array_merge($this->blocks, $blocks);
  4. try {
  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 373)
  1. ob_start();
  2. } else {
  3. ob_start(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. if ($isSandboxed) {
  2. $loaded->unwrap()->checkSecurity();
  3. }
  4. return $loaded->render($variables);
  5. } finally {
  6. if ($isSandboxed && !$alreadySandboxed) {
  7. $sandbox->disableSandbox();
  8. }
  9. }
  1. <main>
  2. ";
  3. // line 7
  4. yield Twig\Extension\CoreExtension::include($this->env, $context, Twig\Extension\CoreExtension::replace($this->getTemplateName(), ["content.html.twig" => "includes/model.html.twig"]));
  5. yield "
  6. ";
  7. // line 10
  8. yield " ";
in vendor/twig/twig/src/Template.php -> doDisplay (line 402)
  1. {
  2. $context += $this->env->getGlobals();
  3. $blocks = array_merge($this->blocks, $blocks);
  4. try {
  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 373)
  1. ob_start();
  2. } else {
  3. ob_start(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. if ($isSandboxed) {
  2. $loaded->unwrap()->checkSecurity();
  3. }
  4. return $loaded->render($variables);
  5. } finally {
  6. if ($isSandboxed && !$alreadySandboxed) {
  7. $sandbox->disableSandbox();
  8. }
  9. }
  1. // line 92
  2. yield "
  3. ";
  4. // line 93
  5. yield Twig\Extension\CoreExtension::include($this->env, $context, Twig\Extension\CoreExtension::replace($this->getTemplateName(), ["template.html.twig" => (CoreExtension::getAttribute($this->env, $this->source, (isset($context["baks_settings"]) || array_key_exists("baks_settings", $context) ? $context["baks_settings"] : (function () { throw new RuntimeError('Variable "baks_settings" does not exist.', 93, $this->source); })()), "device", [], "any", false, false, false, 93) . "/content.html.twig")]));
  6. yield "
  7. ";
  8. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in vendor/twig/twig/src/Template.php -> block_content (line 446)
  1. throw new \LogicException('A block must be a method on a \Twig\Template instance.');
  2. }
  3. if (null !== $template) {
  4. try {
  5. yield from $template->$block($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($template->getSourceContext());
  9. }
  1. yield from $this->load($this->extensions['BaksDev\Core\Twig\TemplateExtension']->extends((("@products-category:public/navbar/" . CoreExtension::getAttribute($this->env, $this->source, (isset($context["baks_settings"]) || array_key_exists("baks_settings", $context) ? $context["baks_settings"] : (function () { throw new RuntimeError('Variable "baks_settings" does not exist.', 173, $this->source); })()), "device", [], "any", false, false, false, 173)) . "/navbar.html.twig")), 173)->unwrap()->yield($context);
  2. // line 174
  3. yield "
  4. ";
  5. // line 175
  6. yield from $this->unwrap()->yieldBlock('content', $context, $blocks);
  7. // line 178
  8. yield "
  9. ";
  10. // line 179
  11. yield from $this->unwrap()->yieldBlock('footer', $context, $blocks);
in vendor/twig/twig/src/Template.php -> doDisplay (line 402)
  1. {
  2. $context += $this->env->getGlobals();
  3. $blocks = array_merge($this->blocks, $blocks);
  4. try {
  5. yield from $this->doDisplay($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($this->getSourceContext());
  9. }
  1. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@App/products-product/Resources/view/public/model/template.html.twig"));
  2. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  3. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "@App/products-product/Resources/view/public/model/template.html.twig"));
  4. yield from $this->getParent($context)->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 402)
  1. {
  2. $context += $this->env->getGlobals();
  3. $blocks = array_merge($this->blocks, $blocks);
  4. try {
  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 373)
  1. ob_start();
  2. } else {
  3. ob_start(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. $ModuleTemplate = '@App';
  2. if(file_exists($this->project_dir.'/src/'.$module.'/Resources/view/'.$fileName))
  3. {
  4. $view = $ModuleTemplate.'/'.$module.'/Resources/view/'.$fileName;
  5. $content = $this->environment->render($view, $parameters);
  6. }
  7. // Пробуем определить файл шаблона по умолчанию template.html.twig
  8. elseif(file_exists($this->project_dir.'/src/'.$module.'/Resources/view/'.$fileDefault))
  9. {
  10. $view = $ModuleTemplate.'/'.$module.'/Resources/view/'.$fileDefault;
  1. $ProductsReviews = $AllReviewsRepository
  2. ->filter($statusDTO)
  3. ->product($info->getProduct())
  4. ->findPaginator();
  5. return $this->render([
  6. 'card' => $card,
  7. 'reviews' => $ProductsReviews,
  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 29)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/home/dvz.all.baks.dev/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. // if(
  6. // true === in_array($_SERVER['REMOTE_ADDR'], [

Logs

No log messages

Stack Traces 2

[2/2] RuntimeError
Twig\Error\RuntimeError:
An exception has been thrown during the rendering of a template ("Warning: Attempt to read property "field_public" on array") in "@App/products-product/Resources/view/public/model/pc/includes/model.html.twig" at line 16.

  at src/products-product/Resources/view/public/model/pc/includes/model.html.twig:16
  at Twig\Template->yield()
     (vendor/twig/twig/src/Template.php:358)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:373)
  at Twig\Template->render()
     (vendor/twig/twig/src/TemplateWrapper.php:51)
  at Twig\TemplateWrapper->render()
     (vendor/twig/twig/src/Extension/CoreExtension.php:1526)
  at Twig\Extension\CoreExtension::include()
     (var/cache/dev/twig/35/358ee1d1c030e36828a0264ac9738f1b.php:55)
  at __TwigTemplate_3244bd783b20fe64e669a34f99514b50->doDisplay()
     (vendor/twig/twig/src/Template.php:402)
  at Twig\Template->yield()
     (vendor/twig/twig/src/Template.php:358)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:373)
  at Twig\Template->render()
     (vendor/twig/twig/src/TemplateWrapper.php:51)
  at Twig\TemplateWrapper->render()
     (vendor/twig/twig/src/Extension/CoreExtension.php:1526)
  at Twig\Extension\CoreExtension::include()
     (var/cache/dev/twig/e0/e08f3dd5cf47e6383e7d932b994ece4a.php:332)
  at __TwigTemplate_5d222addca96b43c78a7051860cbe725->block_content()
     (vendor/twig/twig/src/Template.php:446)
  at Twig\Template->yieldBlock()
     (var/cache/dev/twig/5f/5fe47bcdb11345a84ceaa805d52f53d6.php:127)
  at __TwigTemplate_566c2218864d31dd653cd6dc4d4f0f99->doDisplay()
     (vendor/twig/twig/src/Template.php:402)
  at Twig\Template->yield()
     (var/cache/dev/twig/e0/e08f3dd5cf47e6383e7d932b994ece4a.php:56)
  at __TwigTemplate_5d222addca96b43c78a7051860cbe725->doDisplay()
     (vendor/twig/twig/src/Template.php:402)
  at Twig\Template->yield()
     (vendor/twig/twig/src/Template.php:358)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:373)
  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/baks-dev/core/Controller/AbstractController.php:359)
  at BaksDev\Core\Controller\AbstractController->render()
     (vendor/baks-dev/products-product/Controller/Public/ModelController.php:71)
  at BaksDev\Products\Product\Controller\Public\ModelController->model()
     (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:29)
  at require_once('/home/dvz.all.baks.dev/vendor/autoload_runtime.php')
     (public/index.php:5)                
[1/2] ErrorException
ErrorException:
Warning: Attempt to read property "field_public" on array

  at vendor/baks-dev/products-product/Repository/ProductModel/ProductModelResult.php:207
  at BaksDev\Products\Product\Repository\ProductModel\ProductModelResult::{closure:BaksDev\Products\Product\Repository\ProductModel\ProductModelResult::getCategorySectionField():207}()
  at array_filter()
     (vendor/baks-dev/products-product/Repository/ProductModel/ProductModelResult.php:207)
  at BaksDev\Products\Product\Repository\ProductModel\ProductModelResult->getCategorySectionField()
     (vendor/twig/twig/src/Extension/CoreExtension.php:1919)
  at Twig\Extension\CoreExtension::getAttribute()
     (var/cache/dev/twig/2f/2f799b81c855e280e0746a5435663381.php:79)
  at __TwigTemplate_069691813d015a08aea76dc4e0348200->doDisplay()
     (vendor/twig/twig/src/Template.php:402)
  at Twig\Template->yield()
     (vendor/twig/twig/src/Template.php:358)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:373)
  at Twig\Template->render()
     (vendor/twig/twig/src/TemplateWrapper.php:51)
  at Twig\TemplateWrapper->render()
     (vendor/twig/twig/src/Extension/CoreExtension.php:1526)
  at Twig\Extension\CoreExtension::include()
     (var/cache/dev/twig/35/358ee1d1c030e36828a0264ac9738f1b.php:55)
  at __TwigTemplate_3244bd783b20fe64e669a34f99514b50->doDisplay()
     (vendor/twig/twig/src/Template.php:402)
  at Twig\Template->yield()
     (vendor/twig/twig/src/Template.php:358)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:373)
  at Twig\Template->render()
     (vendor/twig/twig/src/TemplateWrapper.php:51)
  at Twig\TemplateWrapper->render()
     (vendor/twig/twig/src/Extension/CoreExtension.php:1526)
  at Twig\Extension\CoreExtension::include()
     (var/cache/dev/twig/e0/e08f3dd5cf47e6383e7d932b994ece4a.php:332)
  at __TwigTemplate_5d222addca96b43c78a7051860cbe725->block_content()
     (vendor/twig/twig/src/Template.php:446)
  at Twig\Template->yieldBlock()
     (var/cache/dev/twig/5f/5fe47bcdb11345a84ceaa805d52f53d6.php:127)
  at __TwigTemplate_566c2218864d31dd653cd6dc4d4f0f99->doDisplay()
     (vendor/twig/twig/src/Template.php:402)
  at Twig\Template->yield()
     (var/cache/dev/twig/e0/e08f3dd5cf47e6383e7d932b994ece4a.php:56)
  at __TwigTemplate_5d222addca96b43c78a7051860cbe725->doDisplay()
     (vendor/twig/twig/src/Template.php:402)
  at Twig\Template->yield()
     (vendor/twig/twig/src/Template.php:358)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:373)
  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/baks-dev/core/Controller/AbstractController.php:359)
  at BaksDev\Core\Controller\AbstractController->render()
     (vendor/baks-dev/products-product/Controller/Public/ModelController.php:71)
  at BaksDev\Products\Product\Controller\Public\ModelController->model()
     (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:29)
  at require_once('/home/dvz.all.baks.dev/vendor/autoload_runtime.php')
     (public/index.php:5)