https://gomel.test.dev.slivki.by/sushi-skidka-yosushirolly

Exceptions

An exception has been thrown during the rendering of a template ("Entity of type 'Slivki\Entity\Media' for IDs ID(1390776) was not found").

  • Exceptions 2
  • Logs
  • Stack Traces 2

Twig\Error\ RuntimeError

  1. {% set subscribed = app.user and isSubscriber(app.user) %}
  2.     {% block ogimage %}
  3.         {% if detailMediaList|length > 0 %}
  4.             <meta property="og:image"
  5.                   content="{{ app.request.getSchemeAndHttpHost() }}{{ getImageURL(detailMediaList|first, 522, 322) }}"/>
  6.             <meta property="og:image:width" content="522"/>
  7.             <meta property="og:image:height" content="322"/>
  8.         {% else %}
  9.             {{ parent() }}
  10.         {% endif %}
  1.         $this->displayBlock('meta'$context$blocks);
  2.         // line 8
  3.         echo "
  4.     ";
  5.         // line 9
  6.         $this->displayBlock('ogimage'$context$blocks);
  7.         // line 14
  8.         echo "
  9.     ";
  10.         // line 15
  11.         $this->displayBlock('stylesheets'$context$blocks);
in vendor/twig/twig/src/Template.php -> doDisplay (line 394)
  1.     }
  2.     protected function displayWithErrorHandling(array $context, array $blocks = [])
  3.     {
  4.         try {
  5.             $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
in vendor/twig/twig/src/Template.php -> displayWithErrorHandling (line 367)
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
  1.         $context["isOfferFavourite"] = ((twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'25$this->source); })()), "user", [], "any"falsefalsefalse25)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'25$this->source); })()), "user", [], "any"falsefalsefalse25), "isOfferFavourite", [=> (isset($context["offer"]) || array_key_exists("offer"$context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.'25$this->source); })())], "method"falsefalsefalse25)) : (false));
  2.         // line 27
  3.         $context["subscribed"] = (twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'27$this->source); })()), "user", [], "any"falsefalsefalse27) && $this->env->getRuntime('Slivki\Twig\SubscriptionTwigRuntime')->isSubscriber(twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'27$this->source); })()), "user", [], "any"falsefalsefalse27)));
  4.         // line 1
  5.         $this->parent $this->loadTemplate("base.html.twig""Slivki/offers/details.html.twig"1);
  6.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  7.         
  8.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  9.         
  10.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
in vendor/twig/twig/src/Template.php -> doDisplay (line 394)
  1.     }
  2.     protected function displayWithErrorHandling(array $context, array $blocks = [])
  3.     {
  4.         try {
  5.             $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
in vendor/twig/twig/src/Template.php -> displayWithErrorHandling (line 367)
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
in vendor/twig/twig/src/Template.php -> display (line 379)
  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.     public function render(array $context = []): string
  2.     {
  3.         // using func_get_args() allows to not expose the blocks argument
  4.         // as it should only be used by internal code
  5.         return $this->template->render($context, \func_get_args()[1] ?? []);
  6.     }
  7.     public function display(array $context = [])
  8.     {
  9.         // using func_get_args() allows to not expose the blocks argument
  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.     {
  2.         if (!$this->container->has('twig')) {
  3.             throw new \LogicException('You cannot use the "renderView" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
  4.         }
  5.         return $this->container->get('twig')->render($view$parameters);
  6.     }
  7.     /**
  8.      * Renders a view.
  9.      */
AbstractController->renderView() in src/Controller/DefaultController.php (line 926)
  1.         $data['hadSubscription'] = null !== $user $subscriptionService->isExistBySubscriber($user) : false;
  2.         $data['codeCostInCurrency'] = $offer->getSumInCurrency((float) $codeCost);
  3.         $view $isMobile 'Slivki/mobile/offer/details.html.twig' 'Slivki/offers/details.html.twig';
  4.         $response->setContent($this->renderView($view$data));
  5.         return $response;
  6.     }
  7.     /**
in vendor/symfony/http-kernel/HttpKernel.php -> detailsAction (line 163)
  1.         $this->dispatcher->dispatch($eventKernelEvents::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);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 30)
  1.     Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);

Doctrine\ORM\ EntityNotFoundException

Entity of type 'Slivki\Entity\Media' for IDs ID(1390776) was not found

  1.         foreach ($id as $key => $value) {
  2.             $ids[] = $key '(' $value ')';
  3.         }
  4.         return new self(
  5.             'Entity of type \'' $className '\'' . ($ids ' for IDs ' implode(', '$ids) : '') . ' was not found'
  6.         );
  7.     }
  8.     /**
in vendor/doctrine/orm/lib/Doctrine/ORM/UnitOfWork.php :: fromClassNameAndIdentifier (line 2028)
  1.                     // If the identifier is ASSIGNED, it is NEW, otherwise an error
  2.                     // since the managed entity was not found.
  3.                     if (! $class->isIdentifierNatural()) {
  4.                         throw EntityNotFoundException::fromClassNameAndIdentifier(
  5.                             $class->getName(),
  6.                             $this->identifierFlattener->flattenIdentifier($class$id)
  7.                         );
  8.                     }
  9.                     $managedCopy $this->newInstance($class);
  10.                     $class->setIdentifierValues($managedCopy$id);
  1.      */
  2.     public function merge($entity)
  3.     {
  4.         $visited = [];
  5.         return $this->doMerge($entity$visited);
  6.     }
  7.     /**
  8.      * Executes a merge operation on an entity.
  9.      *
  1.             throw ORMInvalidArgumentException::invalidObject('EntityManager#merge()'$entity);
  2.         }
  3.         $this->errorIfClosed();
  4.         return $this->unitOfWork->merge($entity);
  5.     }
  6.     /**
  7.      * {@inheritDoc}
  8.      *
  1.     public function merge($entity)
  2.     {
  3.         $this->initializera636f && ($this->initializera636f->__invoke($valueHolder1d80f$this'merge', array('entity' => $entity), $this->initializera636f) || 1) && $this->valueHolder1d80f $valueHolder1d80f;
  4.         return $this->valueHolder1d80f->merge($entity);
  5.     }
  6.     public function copy($entity$deep false)
  7.     {
  8.         $this->initializera636f && ($this->initializera636f->__invoke($valueHolder1d80f$this'copy', array('entity' => $entity'deep' => $deep), $this->initializera636f) || 1) && $this->valueHolder1d80f $valueHolder1d80f;
EntityManager_9a5be93->merge() in src/Services/ImageService.php (line 98)
  1.     {
  2.         return \sprintf('%s%s%s%s'$this->baseUrlself::MEDIA_ROOTself::INITIAL_PATH$path);
  3.     }
  4.     public function getImageURL(AbstractMediaBase $media$width$height) {
  5.         $media $this->entityManager->merge($media);
  6.         if ($width == && $height == 0) {
  7.             return self::MEDIA_ROOT self::INITIAL_PATH $media->getPath() . $media->getName();
  8.         }
  9.         $mediaSizes $media->getSizes();
ImageService->getImageURL() in src/Services/ImageService.php (line 64)
  1.         $cacheKey $media->getID() . self::CACHE_KEY $width "x" $height;
  2.         $imageURLCached $softCache->get($cacheKey);
  3.         if ($imageURLCached) {
  4.             return $imageURLCached;
  5.         }
  6.         $imageURL $this->getImageURL($media$width$height);
  7.         if (!$imageURL) {
  8.             return self::FALLBACK_IMAGE;
  9.         }
  10.         $softCache->set($cacheKey$imageURLself::IMAGE_URL_CACHE_EXPIRE);
  11.         return $imageURL;
ImageService->getImageURLCached() in src/Twig/SlivkiTwigExtension.php (line 570)
  1.         $imageUrl ImageService::FALLBACK_IMAGE;
  2.         if (!$media) {
  3.             return $imageUrl;
  4.         }
  5.         try {
  6.             $imageUrl $this->imageService->getImageURLCached($media$width$height);
  7.         } catch (Exception $exception) {
  8.             $logger Logger::instance('TwigExtension');
  9.             $logger->info('Media ID = ' $media->getID() . ', file = ' $media->getPath() . $media->getName() . ' not found in getImageURL!');
  10.         }
  11.         return $imageUrl;
  1.             // line 30
  2.             echo "            <meta property=\"og:image\"
  3.                   content=\"";
  4.             // line 31
  5.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'31$this->source); })()), "request", [], "any"falsefalsefalse31), "getSchemeAndHttpHost", [], "method"falsefalsefalse31), "html"nulltrue);
  6.             echo twig_escape_filter($this->env$this->extensions['Slivki\Twig\SlivkiTwigExtension']->getImageURL(twig_first($this->env, (isset($context["detailMediaList"]) || array_key_exists("detailMediaList"$context) ? $context["detailMediaList"] : (function () { throw new RuntimeError('Variable "detailMediaList" does not exist.'31$this->source); })())), 522322), "html"nulltrue);
  7.             echo "\"/>
  8.             <meta property=\"og:image:width\" content=\"522\"/>
  9.             <meta property=\"og:image:height\" content=\"322\"/>
  10.         ";
  11.         } else {
in vendor/twig/twig/src/Template.php -> block_ogimage (line 171)
  1.             throw new \LogicException('A block must be a method on a \Twig\Template instance.');
  2.         }
  3.         if (null !== $template) {
  4.             try {
  5.                 $template->$block($context$blocks);
  6.             } catch (Error $e) {
  7.                 if (!$e->getSourceContext()) {
  8.                     $e->setSourceContext($template->getSourceContext());
  9.                 }
  1.         $this->displayBlock('meta'$context$blocks);
  2.         // line 8
  3.         echo "
  4.     ";
  5.         // line 9
  6.         $this->displayBlock('ogimage'$context$blocks);
  7.         // line 14
  8.         echo "
  9.     ";
  10.         // line 15
  11.         $this->displayBlock('stylesheets'$context$blocks);
in vendor/twig/twig/src/Template.php -> doDisplay (line 394)
  1.     }
  2.     protected function displayWithErrorHandling(array $context, array $blocks = [])
  3.     {
  4.         try {
  5.             $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
in vendor/twig/twig/src/Template.php -> displayWithErrorHandling (line 367)
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
  1.         $context["isOfferFavourite"] = ((twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'25$this->source); })()), "user", [], "any"falsefalsefalse25)) ? (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'25$this->source); })()), "user", [], "any"falsefalsefalse25), "isOfferFavourite", [=> (isset($context["offer"]) || array_key_exists("offer"$context) ? $context["offer"] : (function () { throw new RuntimeError('Variable "offer" does not exist.'25$this->source); })())], "method"falsefalsefalse25)) : (false));
  2.         // line 27
  3.         $context["subscribed"] = (twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'27$this->source); })()), "user", [], "any"falsefalsefalse27) && $this->env->getRuntime('Slivki\Twig\SubscriptionTwigRuntime')->isSubscriber(twig_get_attribute($this->env$this->source, (isset($context["app"]) || array_key_exists("app"$context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.'27$this->source); })()), "user", [], "any"falsefalsefalse27)));
  4.         // line 1
  5.         $this->parent $this->loadTemplate("base.html.twig""Slivki/offers/details.html.twig"1);
  6.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  7.         
  8.         $__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e->leave($__internal_085b0142806202599c7fe3b329164a92397d8978207a37e79d70b8c52599e33e_prof);
  9.         
  10.         $__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02->leave($__internal_319393461309892924ff6e74d6d6e64287df64b63545b994e100d4ab223aed02_prof);
in vendor/twig/twig/src/Template.php -> doDisplay (line 394)
  1.     }
  2.     protected function displayWithErrorHandling(array $context, array $blocks = [])
  3.     {
  4.         try {
  5.             $this->doDisplay($context$blocks);
  6.         } catch (Error $e) {
  7.             if (!$e->getSourceContext()) {
  8.                 $e->setSourceContext($this->getSourceContext());
  9.             }
in vendor/twig/twig/src/Template.php -> displayWithErrorHandling (line 367)
  1.         return $this->blocks;
  2.     }
  3.     public function display(array $context, array $blocks = [])
  4.     {
  5.         $this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks$blocks));
  6.     }
  7.     public function render(array $context)
  8.     {
  9.         $level ob_get_level();
in vendor/twig/twig/src/Template.php -> display (line 379)
  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.     public function render(array $context = []): string
  2.     {
  3.         // using func_get_args() allows to not expose the blocks argument
  4.         // as it should only be used by internal code
  5.         return $this->template->render($context, \func_get_args()[1] ?? []);
  6.     }
  7.     public function display(array $context = [])
  8.     {
  9.         // using func_get_args() allows to not expose the blocks argument
  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.     {
  2.         if (!$this->container->has('twig')) {
  3.             throw new \LogicException('You cannot use the "renderView" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
  4.         }
  5.         return $this->container->get('twig')->render($view$parameters);
  6.     }
  7.     /**
  8.      * Renders a view.
  9.      */
AbstractController->renderView() in src/Controller/DefaultController.php (line 926)
  1.         $data['hadSubscription'] = null !== $user $subscriptionService->isExistBySubscriber($user) : false;
  2.         $data['codeCostInCurrency'] = $offer->getSumInCurrency((float) $codeCost);
  3.         $view $isMobile 'Slivki/mobile/offer/details.html.twig' 'Slivki/offers/details.html.twig';
  4.         $response->setContent($this->renderView($view$data));
  5.         return $response;
  6.     }
  7.     /**
in vendor/symfony/http-kernel/HttpKernel.php -> detailsAction (line 163)
  1.         $this->dispatcher->dispatch($eventKernelEvents::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);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Exception $e) {
  7.             if ($e instanceof RequestExceptionInterface) {
  8.                 $e = new BadRequestHttpException($e->getMessage(), $e);
  9.             }
  10.             if (false === $catch) {
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
Kernel->handle() in public/index.php (line 30)
  1.     Request::setTrustedHosts([$trustedHosts]);
  2. }
  3. $kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
  4. $request Request::createFromGlobals();
  5. $response $kernel->handle($request);
  6. $response->send();
  7. $kernel->terminate($request$response);