Exceptions
Exceptions 2
Symfony\Component\HttpKernel\Exception\ NotFoundHttpException
if ($referer = $request->headers->get('referer')) {
$message .= sprintf(' (from "%s")', $referer);
}
throw new NotFoundHttpException($message, $e);
} catch (MethodNotAllowedException $e) {
$message = sprintf('No route found for "%s %s": Method Not Allowed (Allow: %s)', $request->getMethod(), $request->getPathInfo(), implode(', ', $e->getAllowedMethods()));
throw new MethodNotAllowedHttpException($e->getAllowedMethods(), $message, $e);
}
in
vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/EventListener/RouterListener.php
->
onKernelRequest
(line 57)
$request = $event->getRequest();
// This call is required in all cases, because the default router needs our webspace information
// Would be nice to also only call this if the _requestAnalyzer attribute is set, but it's set on the next line
$this->requestAnalyzer->analyze($request);
$this->baseRouteListener->onKernelRequest($event);
if (false !== $request->attributes->getBoolean(static::REQUEST_ANALYZER, true)) {
$this->requestAnalyzer->validate($request);
}
}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
onKernelRequest
(line 304)
$closure = static function (...$args) use (&$listener, &$closure) {
if ($listener[0] instanceof \Closure) {
$listener[0] = $listener[0]();
$listener[1] = $listener[1] ?? '__invoke';
}
($closure = \Closure::fromCallable($listener))(...$args);
};
} else {
$closure = $listener instanceof \Closure || $listener instanceof WrappedListener ? $listener : \Closure::fromCallable($listener);
}
}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
::
Symfony\Component\EventDispatcher\{closure}
(line 264)
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
doDispatch
(line 239)
* @param object $event The event object to pass to the event handlers/listeners
*/
protected function callListeners(iterable $listeners, string $eventName, $event)
{
if ($event instanceof Event) {
$this->doDispatch($listeners, $eventName, $event);
return;
}
$stoppable = $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
callListeners
(line 73)
in
vendor/symfony/http-kernel/HttpKernel.php
->
dispatch
(line 134)
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 80)
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 201)
// When using the HttpCache, you need to call the method in your front controller
// instead of relying on the configuration parameter
// https://symfony.com/doc/3.4/reference/configuration/framework.html#http-method-override
Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Symfony\Component\Routing\Exception\ ResourceNotFoundException
in
vendor/symfony-cmf/routing/src/ChainRouter.php
(line 210)
in
vendor/symfony-cmf/routing/src/ChainRouter.php
->
doMatch
(line 158)
in
vendor/symfony/http-kernel/EventListener/RouterListener.php
->
matchRequest
(line 112)
// add attributes based on the request (routing)
try {
// matching a request is more powerful than matching a URL path + context, so try that first
if ($this->matcher instanceof RequestMatcherInterface) {
$parameters = $this->matcher->matchRequest($request);
} else {
$parameters = $this->matcher->match($request->getPathInfo());
}
if (null !== $this->logger) {
in
vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/EventListener/RouterListener.php
->
onKernelRequest
(line 57)
$request = $event->getRequest();
// This call is required in all cases, because the default router needs our webspace information
// Would be nice to also only call this if the _requestAnalyzer attribute is set, but it's set on the next line
$this->requestAnalyzer->analyze($request);
$this->baseRouteListener->onKernelRequest($event);
if (false !== $request->attributes->getBoolean(static::REQUEST_ANALYZER, true)) {
$this->requestAnalyzer->validate($request);
}
}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
onKernelRequest
(line 304)
$closure = static function (...$args) use (&$listener, &$closure) {
if ($listener[0] instanceof \Closure) {
$listener[0] = $listener[0]();
$listener[1] = $listener[1] ?? '__invoke';
}
($closure = \Closure::fromCallable($listener))(...$args);
};
} else {
$closure = $listener instanceof \Closure || $listener instanceof WrappedListener ? $listener : \Closure::fromCallable($listener);
}
}
in
vendor/symfony/event-dispatcher/EventDispatcher.php
::
Symfony\Component\EventDispatcher\{closure}
(line 264)
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
doDispatch
(line 239)
* @param object $event The event object to pass to the event handlers/listeners
*/
protected function callListeners(iterable $listeners, string $eventName, $event)
{
if ($event instanceof Event) {
$this->doDispatch($listeners, $eventName, $event);
return;
}
$stoppable = $event instanceof ContractsEvent || $event instanceof StoppableEventInterface;
in
vendor/symfony/event-dispatcher/EventDispatcher.php
->
callListeners
(line 73)
in
vendor/symfony/http-kernel/HttpKernel.php
->
dispatch
(line 134)
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 80)
public function handle(Request $request, $type = HttpKernelInterface::MASTER_REQUEST, $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 201)
// When using the HttpCache, you need to call the method in your front controller
// instead of relying on the configuration parameter
// https://symfony.com/doc/3.4/reference/configuration/framework.html#http-method-override
Request::enableHttpMethodParameterOverride();
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
Logs
Level | Channel | Message |
---|---|---|
INFO 04:39:21 | php |
User Deprecated: Using the WebserverBundle is deprecated since Symfony 4.4. The new Symfony local server has more features, you can use it instead. { "exception": {} } |
INFO 04:39:21 | request |
Matched route "_profiler". { "route": "_profiler", "route_parameters": { "_route": "_profiler", "_controller": "web_profiler.controller.profiler::panelAction", "token": "latest" }, "request_uri": "https://sulu.arenaria.dev/_profiler/latest?panel=exception", "method": "GET" } |
INFO 04:39:21 | request |
Matched route "_profiler_exception_css". { "route": "_profiler_exception_css", "route_parameters": { "_route": "_profiler_exception_css", "_controller": "web_profiler.controller.exception_panel::stylesheet", "token": "71eec4" }, "request_uri": "https://sulu.arenaria.dev/_profiler/71eec4/exception.css", "method": "GET" } |
INFO 04:39:21 | request |
Matched route "_profiler_search_bar". { "route": "_profiler_search_bar", "route_parameters": { "_route": "_profiler_search_bar", "_controller": "web_profiler.controller.profiler::searchBarAction" }, "request_uri": "https://sulu.arenaria.dev/_profiler/search_bar?panel=exception", "method": "GET" } |
DEBUG 04:39:22 | doctrine |
SELECT w0_.title AS title_0, w0_.webspace_key AS webspace_key_1, w0_.all_domains AS all_domains_2, w0_.content AS content_3, w0_.type AS type_4, w0_.id AS id_5, w1_.url AS url_6, w1_.environment AS environment_7, w1_.id AS id_8 FROM we_analytics w0_ LEFT JOIN we_analytics_domains w2_ ON w0_.id = w2_.analytics LEFT JOIN we_domains w1_ ON w1_.id = w2_.domain WHERE (w0_.all_domains = 1 OR (w1_.url = ? AND w1_.environment = ?)) AND w0_.webspace_key = ? ORDER BY w0_.id ASC, w1_.id ASC [ "sulu.arenaria.dev", "dev", "sulu-test" ] |
INFO 04:39:22 | request |
Matched route "_profiler_exception". { "route": "_profiler_exception", "route_parameters": { "_route": "_profiler_exception", "_controller": "web_profiler.controller.exception_panel::body", "token": "71eec4" }, "request_uri": "https://sulu.arenaria.dev/_profiler/71eec4/exception", "method": "GET" } |
Stack Traces 2
[2/2] NotFoundHttpException |
---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET /ads.txt" at vendor/symfony/http-kernel/EventListener/RouterListener.php:136 at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest() (vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/EventListener/RouterListener.php:57) at Sulu\Bundle\WebsiteBundle\EventListener\RouterListener->onKernelRequest() (vendor/symfony/event-dispatcher/EventDispatcher.php:304) at Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (vendor/symfony/event-dispatcher/EventDispatcher.php:264) at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() (vendor/symfony/event-dispatcher/EventDispatcher.php:239) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (vendor/symfony/event-dispatcher/EventDispatcher.php:73) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (vendor/symfony/http-kernel/HttpKernel.php:134) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:80) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:201) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:63) |
[1/2] ResourceNotFoundException |
---|
Symfony\Component\Routing\Exception\ResourceNotFoundException: None of the routers in the chain matched this request GET /ads.txt HTTP/1.1 Accept: */* Accept-Encoding: gzip, br, zstd, deflate Host: sulu.arenaria.dev User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) X-Php-Ob-Level: 1 at vendor/symfony-cmf/routing/src/ChainRouter.php:210 at Symfony\Cmf\Component\Routing\ChainRouter->doMatch() (vendor/symfony-cmf/routing/src/ChainRouter.php:158) at Symfony\Cmf\Component\Routing\ChainRouter->matchRequest() (vendor/symfony/http-kernel/EventListener/RouterListener.php:112) at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest() (vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/EventListener/RouterListener.php:57) at Sulu\Bundle\WebsiteBundle\EventListener\RouterListener->onKernelRequest() (vendor/symfony/event-dispatcher/EventDispatcher.php:304) at Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (vendor/symfony/event-dispatcher/EventDispatcher.php:264) at Symfony\Component\EventDispatcher\EventDispatcher->doDispatch() (vendor/symfony/event-dispatcher/EventDispatcher.php:239) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (vendor/symfony/event-dispatcher/EventDispatcher.php:73) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (vendor/symfony/http-kernel/HttpKernel.php:134) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:80) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:201) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:63) |