Symfony Exception

TypeError HttpException HttpException

HTTP 500 Internal Server Error

Failed ErrorController handling

Exceptions 3

Symfony\Component\HttpKernel\Exception\ HttpException

Show exception properties
Symfony\Component\HttpKernel\Exception\HttpException {#1442
  -statusCode: 500
  -headers: []
}
  1.                     self::respond($event->getResponse());
  2.                 }
  3.                 // rimanda in loop con i nuovi valori
  4.                 $this->dispatch($dispatcher);
  5.             }
  6.             throw new HttpException(500'Failed ErrorController handling'$th);
  7.         }
  8.         throw new HttpException(500"Dispatch ended without handling");
  9.     }
  10.     /**
  1.                 $event $dispatcher->dispatch($this->errorErrorEvent::NAME);
  2.                 if ($event->getResponse() instanceof ResponseInterface) {
  3.                     self::respond($event->getResponse());
  4.                 }
  5.                 // rimanda in loop con i nuovi valori
  6.                 $this->dispatch($dispatcher);
  7.             }
  8.             throw new HttpException(500'Failed ErrorController handling'$th);
  9.         }
  10.         throw new HttpException(500"Dispatch ended without handling");
  11.     }
  1.         # carico i plugins nel dispatcher
  2.         # -------------------------------
  3.         $plugins $yaml_loader->fetchConfig('plugins');
  4.         $this->addDispatchSubscribers($event->getDispatcher(), $plugins);
  5.         $this->dispatch($event->getDispatcher());
  6.     }
  7.     /**
  8.      * Dispatch the HTTP request to a controller/action.
  9.      */
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
EventDispatcher->dispatch() in /var/www/vhosts/vimarcom/webroot/public/index.php (line 14)
  1. $projectDir realpath(dirname(__FILE__) . '/..');
  2. $dispatcher = new EventDispatcher();
  3. $dispatcher->addSubscriber(new FrontPlugin($projectDir));
  4. $dispatcher->dispatch(new StartEvent($dispatcher), StartEvent::NAME);

Symfony\Component\HttpKernel\Exception\ HttpException

Error is not an HttpException

  1.             $this->cleanBuffer($obLevel);
  2.             throw $th;
  3.         } catch (Throwable $th) {
  4.             $this->cleanBuffer($obLevel);
  5.             throw new HttpException(500"Error is not an HttpException"$th);
  6.         }
  7.     }
  8.     /**
  9.      * Se vi dovesse essere un errore questo metodo pulisce il buffer.
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.             // effettuo il dispatch degli eventi sui plugin caricati
  2.             switch (true) {
  3.                 case ($event $dispatcher->dispatch(new DomainEvent($dispatcher), DomainEvent::NAME)) && ($event->getResponse() instanceof ResponseInterface):
  4.                     /** @var \Vimar\Core\Event\DomainEvent $event */
  5.                 case ($event $dispatcher->dispatch(new ActionEvent($dispatcher), ActionEvent::NAME)) && ($event->getResponse() instanceof ResponseInterface):
  6.                     /** @var \Vimar\Core\Event\ActionEvent $event */
  7.                     
  8.                     // fase finale, invio della risposta al client
  9.                     self::respond($event->getResponse());
  10.             }
  1.                 $event $dispatcher->dispatch($this->errorErrorEvent::NAME);
  2.                 if ($event->getResponse() instanceof ResponseInterface) {
  3.                     self::respond($event->getResponse());
  4.                 }
  5.                 // rimanda in loop con i nuovi valori
  6.                 $this->dispatch($dispatcher);
  7.             }
  8.             throw new HttpException(500'Failed ErrorController handling'$th);
  9.         }
  10.         throw new HttpException(500"Dispatch ended without handling");
  11.     }
  1.         # carico i plugins nel dispatcher
  2.         # -------------------------------
  3.         $plugins $yaml_loader->fetchConfig('plugins');
  4.         $this->addDispatchSubscribers($event->getDispatcher(), $plugins);
  5.         $this->dispatch($event->getDispatcher());
  6.     }
  7.     /**
  8.      * Dispatch the HTTP request to a controller/action.
  9.      */
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
EventDispatcher->dispatch() in /var/www/vhosts/vimarcom/webroot/public/index.php (line 14)
  1. $projectDir realpath(dirname(__FILE__) . '/..');
  2. $dispatcher = new EventDispatcher();
  3. $dispatcher->addSubscriber(new FrontPlugin($projectDir));
  4. $dispatcher->dispatch(new StartEvent($dispatcher), StartEvent::NAME);

TypeError

Vimar\Menu\Proxy\MenuProxy::getUrl(): Return value must be of type string, bool returned

  1.             throw new \Exception('Invalid menu to render!');
  2.         }
  3.         // proxy all'elenco degli indirizzi
  4.         if (array_key_exists($id$this->hrefs)) {
  5.             return $this->hrefs[$id];
  6.         }
  7.         // chiave di memorizzazione su redis
  8.         $redisKey \Vimar\Core\Shared\RedisKey::menuKey($this->request$id);
  9.         if ($this->redis && $cache && $this->redis->exists($redisKey)) {
  1.                         return '';
  2.                 }
  3.                 return '';
  4.             },
  5.             'nodeDecorator' => function($node) use (&$level$type) {
  6.                 $href $this->menu_proxy->getUrl($node['id']);
  7.                 $href $this->text_format->apply($href'escapeHtmlAttr');
  8.                 $text $this->text_format->apply($node['label'], 'escapeHtml');
  9.                 $target preg_match("~^https?://~i"$href) ? '_blank' null;
  10.                 $rel preg_match("~^https?://~i"$href) ? 'noreferrer' null;
  11.                 $hasChildren = !empty($node['__children']);
MainMenu->Vimar\Core\Service\{closure}() in /var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Service/MainMenu.php (line 227)
  1.                 foreach ($tree as $node) {
  2.                     if ($this->isVisible($node) === false) {
  3.                         continue;
  4.                     }
  5.                     $output .= $options['childOpen']($node);
  6.                     $output .= $options['nodeDecorator']($node);
  7.                     if (count($node['__children']) > 0) {
  8.                         $output .= $build($node['__children']);
  9.                     }
  10.                     $output .= $options['childClose']($node);
  11.                 }
MainMenu->Vimar\Core\Service\{closure}() in /var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Service/MainMenu.php (line 229)
  1.                         continue;
  2.                     }
  3.                     $output .= $options['childOpen']($node);
  4.                     $output .= $options['nodeDecorator']($node);
  5.                     if (count($node['__children']) > 0) {
  6.                         $output .= $build($node['__children']);
  7.                     }
  8.                     $output .= $options['childClose']($node);
  9.                 }
  10.                 $output .= $options['rootClose']($tree);
  11.             }
MainMenu->Vimar\Core\Service\{closure}() in /var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Service/MainMenu.php (line 237)
  1.                 }
  2.                 $output .= $options['rootClose']($tree);
  3.             }
  4.             return $output;
  5.         };
  6.         return $build($this->nestedTree);
  7.     }
  8.     /**
  9.      * Per elaborare il nodo, almeno uno dei sotto nodi deve essere visibile.
  10.      * Se tutti i sottonodi sono nascosti e nessuno visibile, nascondo altrimenti mostro.
  1.                     <a class="nav-link" href="<?php
  2.                         echo $this->url(['module' => 'catalog''controller' => 'product'], 'route-lang-market'true);?>"><?php
  3.                         echo $this->trans("Catalogo prodotti"); ?></a>
  4.                 </li><?php
  5.                 if (isset($main_menu)) :
  6.                     echo $main_menu->render($main_menu::TYPE_MOBILE);
  7.                 endif;
  8.             ?></ul>
  9.         </nav>
  10.     </div>
  11. </div>
include('/var/www/vhosts/vimarcom/webroot/templates/vimar.phtml') in /var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Component/View/View.php (line 65)
  1.     /**
  2.      * Includes the view script in a scope with only public $this variables.
  3.      */
  4.     protected function run()
  5.     {
  6.         include func_get_arg(0);
  7.     }
  8.     /**
  9.      * @return mixed
  10.      */
  1.         // find the script file name using the parent private method
  2.         $this->file $this->resolveToScript($name);
  3.         unset($name); // remove $name from local scope
  4.         ob_start();
  5.         $this->run($this->file);
  6.         return ob_get_clean();
  7.     }
  8.     /**
  9.      * Escape a string for the HTML Attribute context. We use an extended set of characters
  1.     }
  2.     public function render(string $name): string
  3.     {
  4.         if (isset($this->lazyObjectState)) {
  5.             return ($this->lazyObjectState->realInstance ??= ($this->lazyObjectState->initializer)())->render(...\func_get_args());
  6.         }
  7.         return parent::render(...\func_get_args());
  8.     }
  1.             // se non Ã¨ ajax o non Ã¨ nelle azioni ajax permesse e non Ã¨ disabilitato il layout
  2.             default:
  3.                 // inizializza il layout
  4.                 $this->layout->enableLayout()->setRenderer(function() {
  5.                         $scriptPath $this->pathmap->resolveProjectDir('{projectDir}/templates');
  6.                         return $this->view->setScriptPath($scriptPath)->render($this->config['template']);
  7.                     });
  8.                 // prepara il nodo da cui derivare il menu
  9.                 $this->initRootMenu($this->config);
  10.         }
  11.         return $this;
SiteLayout->Vimar\Core\Service\{closure}() in /var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Component/View/Layout.php (line 95)
  1.      * Poi renderizza il layout usando la view impostata.
  2.      */
  3.     public function render(): string
  4.     {
  5.         if ($this->renderer !== null) {
  6.             return $this->renderer->__invoke();
  7.         }
  8.         throw new \BadFunctionCallException("Rendering callback not defined");
  9.     }
  10. }
  1.      * Poi renderizza il layout usando la view impostata.
  2.      */
  3.     public function render(): string
  4.     {
  5.         if ($this->renderer !== null) {
  6.             return $this->renderer->__invoke();
  7.         }
  8.         throw new \BadFunctionCallException("Rendering callback not defined");
  9.     }
  10. }
  1.         $obStartLevel ob_get_level();
  2.         // in caso di errore sul rendering del layout, passo davanti a tutte le eccezioni
  3.         // e segnalo un errore nel layout
  4.         try {
  5.             $content $this->layout->render();
  6.             $body->seek(0);
  7.             $body->write($content);
  8.             // la risposta la ritorno in un secondo momento
  9.         } catch (Throwable $th) {
  10.             while (ob_get_level() > $obStartLevel) {
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.         ob_start();
  2.         $dispatcher $event->getDispatcher();
  3.         try {
  4.             // get output from plugins
  5.             $bufferEvent $dispatcher->dispatch(new BufferEvent($event->getDispatcher()), BufferEvent::NAME);
  6.             $response $bufferEvent->getResponse();
  7.             if ($response instanceof ResponseInterface) {
  8.                 $event->setResponse($response);
  9.             }
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
  1.             // effettuo il dispatch degli eventi sui plugin caricati
  2.             switch (true) {
  3.                 case ($event $dispatcher->dispatch(new DomainEvent($dispatcher), DomainEvent::NAME)) && ($event->getResponse() instanceof ResponseInterface):
  4.                     /** @var \Vimar\Core\Event\DomainEvent $event */
  5.                 case ($event $dispatcher->dispatch(new ActionEvent($dispatcher), ActionEvent::NAME)) && ($event->getResponse() instanceof ResponseInterface):
  6.                     /** @var \Vimar\Core\Event\ActionEvent $event */
  7.                     
  8.                     // fase finale, invio della risposta al client
  9.                     self::respond($event->getResponse());
  10.             }
  1.                 $event $dispatcher->dispatch($this->errorErrorEvent::NAME);
  2.                 if ($event->getResponse() instanceof ResponseInterface) {
  3.                     self::respond($event->getResponse());
  4.                 }
  5.                 // rimanda in loop con i nuovi valori
  6.                 $this->dispatch($dispatcher);
  7.             }
  8.             throw new HttpException(500'Failed ErrorController handling'$th);
  9.         }
  10.         throw new HttpException(500"Dispatch ended without handling");
  11.     }
  1.         # carico i plugins nel dispatcher
  2.         # -------------------------------
  3.         $plugins $yaml_loader->fetchConfig('plugins');
  4.         $this->addDispatchSubscribers($event->getDispatcher(), $plugins);
  5.         $this->dispatch($event->getDispatcher());
  6.     }
  7.     /**
  8.      * Dispatch the HTTP request to a controller/action.
  9.      */
  1.         foreach ($listeners as $listener) {
  2.             if ($stoppable && $event->isPropagationStopped()) {
  3.                 break;
  4.             }
  5.             $listener($event$eventName$this);
  6.         }
  7.     }
  8.     /**
  9.      * Sorts the internal list of listeners for the given event by priority.
  1.         } else {
  2.             $listeners $this->getListeners($eventName);
  3.         }
  4.         if ($listeners) {
  5.             $this->callListeners($listeners$eventName$event);
  6.         }
  7.         return $event;
  8.     }
EventDispatcher->dispatch() in /var/www/vhosts/vimarcom/webroot/public/index.php (line 14)
  1. $projectDir realpath(dirname(__FILE__) . '/..');
  2. $dispatcher = new EventDispatcher();
  3. $dispatcher->addSubscriber(new FrontPlugin($projectDir));
  4. $dispatcher->dispatch(new StartEvent($dispatcher), StartEvent::NAME);

Stack Traces 3

[3/3] HttpException
Symfony\Component\HttpKernel\Exception\HttpException:
Failed ErrorController handling

  at /var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Plugins/FrontPlugin.php:138
  at Vimar\Core\Plugins\FrontPlugin->dispatch()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Plugins/FrontPlugin.php:136)
  at Vimar\Core\Plugins\FrontPlugin->dispatch()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Plugins/FrontPlugin.php:106)
  at Vimar\Core\Plugins\FrontPlugin->setupBaseServices()
     (/var/www/vhosts/vimarcom/webroot/vendor/symfony/event-dispatcher/EventDispatcher.php:220)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/vhosts/vimarcom/webroot/vendor/symfony/event-dispatcher/EventDispatcher.php:56)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/vhosts/vimarcom/webroot/public/index.php:14)                
[2/3] HttpException
Symfony\Component\HttpKernel\Exception\HttpException:
Error is not an HttpException

  at /var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Plugins/BufferPlugin.php:53
  at Vimar\Core\Plugins\BufferPlugin->startBuffering()
     (/var/www/vhosts/vimarcom/webroot/vendor/symfony/event-dispatcher/EventDispatcher.php:220)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/vhosts/vimarcom/webroot/vendor/symfony/event-dispatcher/EventDispatcher.php:56)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Plugins/FrontPlugin.php:120)
  at Vimar\Core\Plugins\FrontPlugin->dispatch()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Plugins/FrontPlugin.php:136)
  at Vimar\Core\Plugins\FrontPlugin->dispatch()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Plugins/FrontPlugin.php:106)
  at Vimar\Core\Plugins\FrontPlugin->setupBaseServices()
     (/var/www/vhosts/vimarcom/webroot/vendor/symfony/event-dispatcher/EventDispatcher.php:220)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/vhosts/vimarcom/webroot/vendor/symfony/event-dispatcher/EventDispatcher.php:56)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/vhosts/vimarcom/webroot/public/index.php:14)                
[1/3] TypeError
TypeError:
Vimar\Menu\Proxy\MenuProxy::getUrl(): Return value must be of type string, bool returned

  at /var/www/vhosts/vimarcom/webroot/src/Vimar/Menu/Proxy/MenuProxy.php:56
  at Vimar\Menu\Proxy\MenuProxy->getUrl()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Service/MainMenu.php:103)
  at Vimar\Core\Service\MainMenu->Vimar\Core\Service\{closure}()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Service/MainMenu.php:227)
  at Vimar\Core\Service\MainMenu->Vimar\Core\Service\{closure}()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Service/MainMenu.php:229)
  at Vimar\Core\Service\MainMenu->Vimar\Core\Service\{closure}()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Service/MainMenu.php:237)
  at Vimar\Core\Service\MainMenu->render()
     (/var/www/vhosts/vimarcom/webroot/templates/vimar.phtml:189)
  at include('/var/www/vhosts/vimarcom/webroot/templates/vimar.phtml')
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Component/View/View.php:65)
  at Vimar\Core\Component\View\View->run()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Component/View/View.php:191)
  at Vimar\Core\Component\View\View->render()
     (/var/www/vhosts/vimarcom/webroot/var/cache/containers/9d30cc3490e7d54f33c6300f97a2d032.php:1703)
  at ViewProxyD13a242->render()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Service/SiteLayout.php:101)
  at Vimar\Core\Service\SiteLayout->Vimar\Core\Service\{closure}()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Component/View/Layout.php:95)
  at Closure->__invoke()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Component/View/Layout.php:95)
  at Vimar\Core\Component\View\Layout->render()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Plugins/LayoutPlugin.php:50)
  at Vimar\Core\Plugins\LayoutPlugin->createLayoutResponse()
     (/var/www/vhosts/vimarcom/webroot/vendor/symfony/event-dispatcher/EventDispatcher.php:220)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/vhosts/vimarcom/webroot/vendor/symfony/event-dispatcher/EventDispatcher.php:56)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Plugins/BufferPlugin.php:40)
  at Vimar\Core\Plugins\BufferPlugin->startBuffering()
     (/var/www/vhosts/vimarcom/webroot/vendor/symfony/event-dispatcher/EventDispatcher.php:220)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/vhosts/vimarcom/webroot/vendor/symfony/event-dispatcher/EventDispatcher.php:56)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Plugins/FrontPlugin.php:120)
  at Vimar\Core\Plugins\FrontPlugin->dispatch()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Plugins/FrontPlugin.php:136)
  at Vimar\Core\Plugins\FrontPlugin->dispatch()
     (/var/www/vhosts/vimarcom/webroot/src/Vimar/Core/Plugins/FrontPlugin.php:106)
  at Vimar\Core\Plugins\FrontPlugin->setupBaseServices()
     (/var/www/vhosts/vimarcom/webroot/vendor/symfony/event-dispatcher/EventDispatcher.php:220)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners()
     (/var/www/vhosts/vimarcom/webroot/vendor/symfony/event-dispatcher/EventDispatcher.php:56)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch()
     (/var/www/vhosts/vimarcom/webroot/public/index.php:14)