Error 500 Internal Server Error

GET https://affinia.online/listings/Maison-en-Bois-Ecologique-187-cbdcc3bd-7a38-4133-965c-4dc69da0f6d2

Forwarded to ErrorController (dc0cc8)

Exceptions

An exception has been thrown during the rendering of a template ("Entity of type 'App\Entity\Album' for IDs id(61) was not found").

Exceptions 2

Twig\Error\ RuntimeError

Show exception properties
Twig\Error\RuntimeError {#6131
  -lineno: 4
  -name: "web/listings/_image_component.html.twig"
  -rawMessage: "An exception has been thrown during the rendering of a template ("Entity of type 'App\Entity\Album' for IDs id(61) was not found")."
  -sourcePath: "/var/www/affiniaAgency/affiniaAgencyPlus/templates/web/listings/_image_component.html.twig"
  -sourceCode: """
    \n
    <div>\n
        {% if listing.property.album %}\n
            <div {{ react_component('ListingPhotoController', {\n
                'images': listing.property.album.getImagesSerialized|json_encode,\n
                'slug': listing.property.album.slug|json_encode,\n
                'lat': listing.property.lat|json_encode,\n
                'lng': listing.property.lng|json_encode,\n
                'name': listing.property.googleStreetLink|json_encode,\n
                'googleStreetLink': listing.property.googleStreetLink|json_encode,\n
            }) }}>\n
                <img src="{{ asset('uploads/properties/' ~ listing.thumb) }}" alt="{{ listing.property.name }}" class="img-fluid card-img-top" />\n
            </div>\n
        {% else %}\n
            <img src="{{ asset('uploads/properties/' ~ listing.thumb) }}" alt="{{ listing.property.name }}" class="img-fluid card-img-top" />\n
        {% endif %}\n
    </div>
    """
}
  1. <div>
  2. {% if listing.property.album %}
  3. <div {{ react_component('ListingPhotoController', {
  4. 'images': listing.property.album.getImagesSerialized|json_encode,
  5. 'slug': listing.property.album.slug|json_encode,
  6. 'lat': listing.property.lat|json_encode,
  7. 'lng': listing.property.lng|json_encode,
  8. 'name': listing.property.googleStreetLink|json_encode,
  1. yield "</p>
  2. <div class=\"col-md-8\">
  3. ";
  4. // line 43
  5. yield from $this->loadTemplate("web/listings/_image_component.html.twig", "web/listings/listings_page.html.twig", 43)->unwrap()->yield($context);
  6. // line 44
  7. yield " <div class=\"card mb-4 mt-2\">
  8. <!-- Main Image -->
  9. <!-- Listing Information -->
in vendor/twig/twig/src/Template.php -> block_body (line 437)
  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->unwrap()->yieldBlock('dashboard', $context, $blocks);
  2. // line 76
  3. yield "<div class=\"\">
  4. ";
  5. // line 77
  6. yield from $this->unwrap()->yieldBlock('body', $context, $blocks);
  7. // line 79
  8. yield "</div>
  9. ";
  10. // line 81
in vendor/twig/twig/src/Template.php -> doDisplay (line 393)
  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_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "web/listings/listings_page.html.twig"));
  3. $this->parent = $this->loadTemplate("/web/base_web.html.twig", "web/listings/listings_page.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 393)
  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 364)
  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. ) {
  2. }
  3. public function render(array $context = []): string
  4. {
  5. return $this->template->render($context);
  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. 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/Web/WebListingController.php (line 100)
  1. return $this->redirectToRoute('app_web_custom_thankyou', ['slug' => $listing->getSlug()]);
  2. }else{
  3. $this->addFlash('danger', $this->translator->trans('app.web.listings.lead_not_created'));
  4. }
  5. }
  6. return $this->render('web/listings/listings_page.html.twig', [
  7. 'controller_name' => 'Listings',
  8. 'listing' => $listing,
  9. 'form' => $form->createView()
  10. ]);
  11. }
  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. $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. }
  1. if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) {
  2. Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet());
  3. }
  4. try {
  5. return $kernel->handle($request, $type, $catch);
  6. } finally {
  7. // restore global state
  8. Request::setTrustedProxies($trustedProxies, $trustedHeaderSet);
  9. }
  10. }
  1. protected function forward(Request $request, bool $catch = false, ?Response $entry = null): Response
  2. {
  3. $this->surrogate?->addSurrogateCapability($request);
  4. // always a "master" request (as the real master request can be in cache)
  5. $response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MAIN_REQUEST, $catch);
  6. /*
  7. * Support stale-if-error given on Responses or as a config option.
  8. * RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual
  9. * Cache-Control directives) that
  1. protected function forward(Request $request, bool $catch = false, ?Response $entry = null): Response
  2. {
  3. $this->getKernel()->boot();
  4. $this->getKernel()->getContainer()->set('cache', $this);
  5. return parent::forward($request, $catch, $entry);
  6. }
  7. /**
  8. * Returns an array of options to customize the Cache configuration.
  9. */
  1. // avoid that the backend sends no content
  2. $subRequest->headers->remove('If-Modified-Since');
  3. $subRequest->headers->remove('If-None-Match');
  4. $response = $this->forward($subRequest, $catch);
  5. if ($response->isCacheable()) {
  6. $this->store($request, $response);
  7. }
  1. }
  2. if (null === $entry) {
  3. $this->record($request, 'miss');
  4. return $this->fetch($request, $catch);
  5. }
  6. if (!$this->isFreshEnough($request, $entry)) {
  7. $this->record($request, 'stale');
  1. reload the cache by fetching a fresh response and caching it (if possible).
  2. */
  3. $this->record($request, 'reload');
  4. $response = $this->fetch($request, $catch);
  5. } else {
  6. $response = $this->lookup($request, $catch);
  7. }
  8. $this->restoreResponseBody($request, $response);
  9. if (HttpKernelInterface::MAIN_REQUEST === $type) {
  1. {
  2. if (!$this->booted) {
  3. $container = $this->container ?? $this->preBoot();
  4. if ($container->has('http_cache')) {
  5. return $container->get('http_cache')->handle($request, $type, $catch);
  6. }
  7. }
  8. $this->boot();
  9. ++$this->requestStackSize;
  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('/var/www/affiniaAgency/affiniaAgencyPlus/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. };

Doctrine\ORM\ EntityNotFoundException

Entity of type 'App\Entity\Album' for IDs id(61) 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/src/Proxy/ProxyFactory.php :: fromClassNameAndIdentifier (line 367)
  1. {
  2. return static function (InternalProxy $proxy, array $identifier) use ($entityPersister, $classMetadata, $identifierFlattener): void {
  3. $original = $entityPersister->loadById($identifier);
  4. if ($original === null) {
  5. throw EntityNotFoundException::fromClassNameAndIdentifier(
  6. $classMetadata->getName(),
  7. $identifierFlattener->flattenIdentifier($classMetadata, $identifier)
  8. );
  9. }
in vendor/doctrine/orm/src/Proxy/ProxyFactory.php :: Doctrine\ORM\Proxy\{closure} (line 471)
  1. $proxyClassName = $this->loadProxyClass($class);
  2. $identifierFields = array_intersect_key($class->getReflectionProperties(), $identifiers);
  3. $proxyFactory = Closure::bind(static function (array $identifier) use ($initializer, $skippedProperties, $identifierFields, $className): InternalProxy {
  4. $proxy = self::createLazyGhost(static function (InternalProxy $object) use ($initializer, $identifier): void {
  5. $initializer($object, $identifier);
  6. }, $skippedProperties);
  7. foreach ($identifierFields as $idField => $reflector) {
  8. if (! isset($identifier[$idField])) {
  9. throw ORMInvalidArgumentException::missingPrimaryKeyValue($className, $idField);
in vendor/symfony/var-exporter/Internal/LazyObjectState.php :: Doctrine\ORM\Proxy\{closure} (line 59)
  1. try {
  2. if ($defaultProperties = array_diff_key(LazyObjectRegistry::$defaultProperties[$instance::class], $this->skippedProperties)) {
  3. PublicHydrator::hydrate($instance, $defaultProperties);
  4. }
  5. ($this->initializer)($instance);
  6. } catch (\Throwable $e) {
  7. $this->status = self::STATUS_UNINITIALIZED_FULL;
  8. $this->reset($instance);
  9. throw $e;
  1. ?? Hydrator::$propertyScopes[$this::class][$property][3] = new \ReflectionProperty($scope ?? $class, $name);
  2. } else {
  3. $property = null;
  4. }
  5. if ($property?->isInitialized($this) ?? LazyObjectState::STATUS_UNINITIALIZED_PARTIAL !== $state->initialize($this, $name, $readonlyScope ?? $scope)) {
  6. goto get_in_scope;
  7. }
  8. }
  9. }
Album->__get() in src/Entity/Album.php (line 75)
  1. return $this;
  2. }
  3. public function getAlbumImages(): Collection
  4. {
  5. return $this->albumImages;
  6. }
  7. public function addAlbumImage(AlbumImage $albumImage): static
  8. {
  9. if (!$this->albumImages->contains($albumImage)) {
Album->getAlbumImages() in src/Entity/Album.php (line 161)
  1. return $this;
  2. }
  3. public function getImagesSerialized(): string
  4. {
  5. $images = [];
  6. foreach ($this->getAlbumImages() as $image) {
  7. $images[] = [
  8. 'id' => $image->getId(),
  9. 'url' => $image->getImage(),
  10. ];
in vendor/twig/twig/src/Extension/CoreExtension.php -> getImagesSerialized (line 1754)
  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 3
  3. if (CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["listing"]) || array_key_exists("listing", $context) ? $context["listing"] : (function () { throw new RuntimeError('Variable "listing" does not exist.', 3, $this->source); })()), "property", [], "any", false, false, false, 3), "album", [], "any", false, false, false, 3)) {
  4. // line 4
  5. yield " <div ";
  6. yield $this->extensions['Symfony\UX\React\Twig\ReactComponentExtension']->renderReactComponent("ListingPhotoController", ["images" => json_encode(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 5
  7. (isset($context["listing"]) || array_key_exists("listing", $context) ? $context["listing"] : (function () { throw new RuntimeError('Variable "listing" does not exist.', 5, $this->source); })()), "property", [], "any", false, false, false, 5), "album", [], "any", false, false, false, 5), "getImagesSerialized", [], "any", false, false, false, 5)), "slug" => json_encode(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 6
  8. (isset($context["listing"]) || array_key_exists("listing", $context) ? $context["listing"] : (function () { throw new RuntimeError('Variable "listing" does not exist.', 6, $this->source); })()), "property", [], "any", false, false, false, 6), "album", [], "any", false, false, false, 6), "slug", [], "any", false, false, false, 6)), "lat" => json_encode(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 7
  9. (isset($context["listing"]) || array_key_exists("listing", $context) ? $context["listing"] : (function () { throw new RuntimeError('Variable "listing" does not exist.', 7, $this->source); })()), "property", [], "any", false, false, false, 7), "lat", [], "any", false, false, false, 7)), "lng" => json_encode(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 8
  10. (isset($context["listing"]) || array_key_exists("listing", $context) ? $context["listing"] : (function () { throw new RuntimeError('Variable "listing" does not exist.', 8, $this->source); })()), "property", [], "any", false, false, false, 8), "lng", [], "any", false, false, false, 8)), "name" => json_encode(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 9
  11. (isset($context["listing"]) || array_key_exists("listing", $context) ? $context["listing"] : (function () { throw new RuntimeError('Variable "listing" does not exist.', 9, $this->source); })()), "property", [], "any", false, false, false, 9), "googleStreetLink", [], "any", false, false, false, 9)), "googleStreetLink" => json_encode(CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, // line 10
in vendor/twig/twig/src/Template.php -> doDisplay (line 393)
  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. yield "</p>
  2. <div class=\"col-md-8\">
  3. ";
  4. // line 43
  5. yield from $this->loadTemplate("web/listings/_image_component.html.twig", "web/listings/listings_page.html.twig", 43)->unwrap()->yield($context);
  6. // line 44
  7. yield " <div class=\"card mb-4 mt-2\">
  8. <!-- Main Image -->
  9. <!-- Listing Information -->
in vendor/twig/twig/src/Template.php -> block_body (line 437)
  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->unwrap()->yieldBlock('dashboard', $context, $blocks);
  2. // line 76
  3. yield "<div class=\"\">
  4. ";
  5. // line 77
  6. yield from $this->unwrap()->yieldBlock('body', $context, $blocks);
  7. // line 79
  8. yield "</div>
  9. ";
  10. // line 81
in vendor/twig/twig/src/Template.php -> doDisplay (line 393)
  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_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "web/listings/listings_page.html.twig"));
  3. $this->parent = $this->loadTemplate("/web/base_web.html.twig", "web/listings/listings_page.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 393)
  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 364)
  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. ) {
  2. }
  3. public function render(array $context = []): string
  4. {
  5. return $this->template->render($context);
  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. 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/Web/WebListingController.php (line 100)
  1. return $this->redirectToRoute('app_web_custom_thankyou', ['slug' => $listing->getSlug()]);
  2. }else{
  3. $this->addFlash('danger', $this->translator->trans('app.web.listings.lead_not_created'));
  4. }
  5. }
  6. return $this->render('web/listings/listings_page.html.twig', [
  7. 'controller_name' => 'Listings',
  8. 'listing' => $listing,
  9. 'form' => $form->createView()
  10. ]);
  11. }
  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. $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. }
  1. if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) {
  2. Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet());
  3. }
  4. try {
  5. return $kernel->handle($request, $type, $catch);
  6. } finally {
  7. // restore global state
  8. Request::setTrustedProxies($trustedProxies, $trustedHeaderSet);
  9. }
  10. }
  1. protected function forward(Request $request, bool $catch = false, ?Response $entry = null): Response
  2. {
  3. $this->surrogate?->addSurrogateCapability($request);
  4. // always a "master" request (as the real master request can be in cache)
  5. $response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MAIN_REQUEST, $catch);
  6. /*
  7. * Support stale-if-error given on Responses or as a config option.
  8. * RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual
  9. * Cache-Control directives) that
  1. protected function forward(Request $request, bool $catch = false, ?Response $entry = null): Response
  2. {
  3. $this->getKernel()->boot();
  4. $this->getKernel()->getContainer()->set('cache', $this);
  5. return parent::forward($request, $catch, $entry);
  6. }
  7. /**
  8. * Returns an array of options to customize the Cache configuration.
  9. */
  1. // avoid that the backend sends no content
  2. $subRequest->headers->remove('If-Modified-Since');
  3. $subRequest->headers->remove('If-None-Match');
  4. $response = $this->forward($subRequest, $catch);
  5. if ($response->isCacheable()) {
  6. $this->store($request, $response);
  7. }
  1. }
  2. if (null === $entry) {
  3. $this->record($request, 'miss');
  4. return $this->fetch($request, $catch);
  5. }
  6. if (!$this->isFreshEnough($request, $entry)) {
  7. $this->record($request, 'stale');
  1. reload the cache by fetching a fresh response and caching it (if possible).
  2. */
  3. $this->record($request, 'reload');
  4. $response = $this->fetch($request, $catch);
  5. } else {
  6. $response = $this->lookup($request, $catch);
  7. }
  8. $this->restoreResponseBody($request, $response);
  9. if (HttpKernelInterface::MAIN_REQUEST === $type) {
  1. {
  2. if (!$this->booted) {
  3. $container = $this->container ?? $this->preBoot();
  4. if ($container->has('http_cache')) {
  5. return $container->get('http_cache')->handle($request, $type, $catch);
  6. }
  7. }
  8. $this->boot();
  9. ++$this->requestStackSize;
  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('/var/www/affiniaAgency/affiniaAgencyPlus/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 09:26:34 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "d51182"
    },
    "request_uri": "https://affinia.online/_profiler/d51182?panel=exception&type=request",
    "method": "GET"
}

Stack Traces 2

[2/2] RuntimeError
Twig\Error\RuntimeError:
An exception has been thrown during the rendering of a template ("Entity of type 'App\Entity\Album' for IDs id(61) was not found").

  at templates/web/listings/_image_component.html.twig:4
  at Twig\Template->yield()
     (var/cache/dev/twig/f3/f3513b73664001b8fcc681a6afd99e1c.php:139)
  at __TwigTemplate_0fd1331be4ab6a59f832a86e41e4f482->block_body()
     (vendor/twig/twig/src/Template.php:437)
  at Twig\Template->yieldBlock()
     (var/cache/dev/twig/c3/c3f8e2a5369ef3f31ae6d01ffb2e5689.php:114)
  at __TwigTemplate_56adef6eb9b8b8180a39c1c87a12bc2f->doDisplay()
     (vendor/twig/twig/src/Template.php:393)
  at Twig\Template->yield()
     (var/cache/dev/twig/f3/f3513b73664001b8fcc681a6afd99e1c.php:54)
  at __TwigTemplate_0fd1331be4ab6a59f832a86e41e4f482->doDisplay()
     (vendor/twig/twig/src/Template.php:393)
  at Twig\Template->yield()
     (vendor/twig/twig/src/Template.php:349)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:364)
  at Twig\Template->render()
     (vendor/twig/twig/src/TemplateWrapper.php:35)
  at Twig\TemplateWrapper->render()
     (vendor/twig/twig/src/Environment.php:306)
  at Twig\Environment->render()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:431)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRenderView()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:436)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRender()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:250)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render()
     (src/Controller/Web/WebListingController.php:100)
  at App\Controller\Web\WebListingController->page()
     (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:182)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:86)
  at Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle()
     (vendor/symfony/http-kernel/HttpCache/HttpCache.php:460)
  at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward()
     (vendor/symfony/framework-bundle/HttpCache/HttpCache.php:68)
  at Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->forward()
     (vendor/symfony/http-kernel/HttpCache/HttpCache.php:437)
  at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch()
     (vendor/symfony/http-kernel/HttpCache/HttpCache.php:335)
  at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup()
     (vendor/symfony/http-kernel/HttpCache/HttpCache.php:213)
  at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle()
     (vendor/symfony/http-kernel/Kernel.php:173)
  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('/var/www/affiniaAgency/affiniaAgencyPlus/vendor/autoload_runtime.php')
     (public/index.php:5)                
[1/2] EntityNotFoundException
Doctrine\ORM\EntityNotFoundException:
Entity of type 'App\Entity\Album' for IDs id(61) was not found

  at vendor/doctrine/orm/src/EntityNotFoundException.php:33
  at Doctrine\ORM\EntityNotFoundException::fromClassNameAndIdentifier()
     (vendor/doctrine/orm/src/Proxy/ProxyFactory.php:367)
  at Doctrine\ORM\Proxy\ProxyFactory::Doctrine\ORM\Proxy\{closure}()
     (vendor/doctrine/orm/src/Proxy/ProxyFactory.php:471)
  at Proxies\__CG__\App\Entity\Album::Doctrine\ORM\Proxy\{closure}()
     (vendor/symfony/var-exporter/Internal/LazyObjectState.php:59)
  at Symfony\Component\VarExporter\Internal\LazyObjectState->initialize()
     (vendor/symfony/var-exporter/LazyGhostTrait.php:129)
  at Proxies\__CG__\App\Entity\Album->__get()
     (src/Entity/Album.php:75)
  at App\Entity\Album->getAlbumImages()
     (src/Entity/Album.php:161)
  at App\Entity\Album->getImagesSerialized()
     (vendor/twig/twig/src/Extension/CoreExtension.php:1754)
  at Twig\Extension\CoreExtension::getAttribute()
     (var/cache/dev/twig/21/210729381dfc8537837397e2c0915908.php:55)
  at __TwigTemplate_e5510dfa3801bb7614efdfda503a1365->doDisplay()
     (vendor/twig/twig/src/Template.php:393)
  at Twig\Template->yield()
     (var/cache/dev/twig/f3/f3513b73664001b8fcc681a6afd99e1c.php:139)
  at __TwigTemplate_0fd1331be4ab6a59f832a86e41e4f482->block_body()
     (vendor/twig/twig/src/Template.php:437)
  at Twig\Template->yieldBlock()
     (var/cache/dev/twig/c3/c3f8e2a5369ef3f31ae6d01ffb2e5689.php:114)
  at __TwigTemplate_56adef6eb9b8b8180a39c1c87a12bc2f->doDisplay()
     (vendor/twig/twig/src/Template.php:393)
  at Twig\Template->yield()
     (var/cache/dev/twig/f3/f3513b73664001b8fcc681a6afd99e1c.php:54)
  at __TwigTemplate_0fd1331be4ab6a59f832a86e41e4f482->doDisplay()
     (vendor/twig/twig/src/Template.php:393)
  at Twig\Template->yield()
     (vendor/twig/twig/src/Template.php:349)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:364)
  at Twig\Template->render()
     (vendor/twig/twig/src/TemplateWrapper.php:35)
  at Twig\TemplateWrapper->render()
     (vendor/twig/twig/src/Environment.php:306)
  at Twig\Environment->render()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:431)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRenderView()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:436)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRender()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:250)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render()
     (src/Controller/Web/WebListingController.php:100)
  at App\Controller\Web\WebListingController->page()
     (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:182)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:86)
  at Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle()
     (vendor/symfony/http-kernel/HttpCache/HttpCache.php:460)
  at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward()
     (vendor/symfony/framework-bundle/HttpCache/HttpCache.php:68)
  at Symfony\Bundle\FrameworkBundle\HttpCache\HttpCache->forward()
     (vendor/symfony/http-kernel/HttpCache/HttpCache.php:437)
  at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch()
     (vendor/symfony/http-kernel/HttpCache/HttpCache.php:335)
  at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup()
     (vendor/symfony/http-kernel/HttpCache/HttpCache.php:213)
  at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle()
     (vendor/symfony/http-kernel/Kernel.php:173)
  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('/var/www/affiniaAgency/affiniaAgencyPlus/vendor/autoload_runtime.php')
     (public/index.php:5)