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->getUriForPath($request->getPathInfo()), implode(', ', $e->getAllowedMethods()));
throw new MethodNotAllowedHttpException($e->getAllowedMethods(), $message, $e);
}
$this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
$e = $this->stopwatch->start($this->name, 'event_listener');
try {
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
*/
private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response
{
// request
$event = new RequestEvent($this, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::REQUEST);
if ($event->hasResponse()) {
return $this->filterResponse($event->getResponse(), $request, $type);
}
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$subRequest->attributes->add($request->attributes->all());
$subRequest->setLocale($defaultLocale);
$subRequest->attributes->set('virtual_translation', true);
$subRequest->attributes->set('virtual_locale', $locale);
$fallbackResponse = $this->httpKernel->handle($subRequest);
if (!$fallbackResponse->isSuccessful()) {
$this->logger->error(sprintf(
'Failed to fetch fallback content. Status code: %d, Path: %s',
$fallbackResponse->getStatusCode(),
$fallbackUrl
): ?string {
if ($response->isSuccessful() && $this->isHtmlResponse($response)) {
return $response->getContent();
}
return $this->fetchContentFromFallbackUrl($request, $locale, $defaultLocale);
}
private function fetchContentFromFallbackUrl(
Request $request,
string $locale,
"virtual_locale_{$locale}",
"virtual_path_{$requestPath}",
"virtual_translation_url_{$request->getPathInfo()}",
];
$originalContent = $this->getOriginalContent($request, $response, $locale, $defaultLocale);
if ($originalContent === null) {
// No content available, we can't do anything
return;
}
if ($this->shouldSkipTranslation($locale) || $this->isRouteOrDocumentExcluded($request) || !$this->isHtmlResponse($response)) {
return;
}
// Delegate translation handling to TranslationService
$this->translationService->handleTranslation($request, $response, $locale, $this->defaultLocale);
} catch (Exception|InvalidArgumentException|RunTimeException $e) {
ApplicationLogger::getInstance()->error('TranslationListener error: ' . $e->getMessage());
}
}
$this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
$e = $this->stopwatch->start($this->name, 'event_listener');
try {
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
*/
private function filterResponse(Response $response, Request $request, int $type): Response
{
$event = new ResponseEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::RESPONSE);
$this->finishRequest($request, $type);
return $event->getResponse();
}
$response->setStatusCode(500);
}
}
try {
return $this->filterResponse($response, $request, $type);
} catch (\Exception $e) {
return $response;
}
}
$this->finishRequest($request, $type);
throw $e;
}
return $this->handleThrowable($e, $request, $type);
} finally {
$this->requestStack->pop();
}
}
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$kernel = \Pimcore\Bootstrap::kernel();
// reset current request - will be read from request stack from now on
Tool::setCurrentRequest(null);
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
$info = $request
? "this request\n$request"
: "url '$pathinfo'";
throw $methodNotAllowed ?: new ResourceNotFoundException("None of the routers in the chain matched $info");
}
/**
* {@inheritdoc}
*
*
* Loops through all routes and tries to match the passed request.
*/
public function matchRequest(Request $request)
{
return $this->doMatch($request->getPathInfo(), $request);
}
/**
* Loops through all routers and tries to match the passed request or url.
*
// 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) {
$this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
$e = $this->stopwatch->start($this->name, 'event_listener');
try {
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
*/
private function handleRaw(Request $request, int $type = self::MAIN_REQUEST): Response
{
// request
$event = new RequestEvent($this, $request, $type);
$this->dispatcher->dispatch($event, KernelEvents::REQUEST);
if ($event->hasResponse()) {
return $this->filterResponse($event->getResponse(), $request, $type);
}
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$subRequest->attributes->add($request->attributes->all());
$subRequest->setLocale($defaultLocale);
$subRequest->attributes->set('virtual_translation', true);
$subRequest->attributes->set('virtual_locale', $locale);
$fallbackResponse = $this->httpKernel->handle($subRequest);
if (!$fallbackResponse->isSuccessful()) {
$this->logger->error(sprintf(
'Failed to fetch fallback content. Status code: %d, Path: %s',
$fallbackResponse->getStatusCode(),
$fallbackUrl
): ?string {
if ($response->isSuccessful() && $this->isHtmlResponse($response)) {
return $response->getContent();
}
return $this->fetchContentFromFallbackUrl($request, $locale, $defaultLocale);
}
private function fetchContentFromFallbackUrl(
Request $request,
string $locale,
"virtual_locale_{$locale}",
"virtual_path_{$requestPath}",
"virtual_translation_url_{$request->getPathInfo()}",
];
$originalContent = $this->getOriginalContent($request, $response, $locale, $defaultLocale);
if ($originalContent === null) {
// No content available, we can't do anything
return;
}
if ($this->shouldSkipTranslation($locale) || $this->isRouteOrDocumentExcluded($request) || !$this->isHtmlResponse($response)) {
return;
}
// Delegate translation handling to TranslationService
$this->translationService->handleTranslation($request, $response, $locale, $this->defaultLocale);
} catch (Exception|InvalidArgumentException|RunTimeException $e) {
ApplicationLogger::getInstance()->error('TranslationListener error: ' . $e->getMessage());
}
}
$this->priority = $dispatcher->getListenerPriority($eventName, $this->listener);
$e = $this->stopwatch->start($this->name, 'event_listener');
try {
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
try {
$this->beforeDispatch($eventName, $event);
try {
$e = $this->stopwatch->start($eventName, 'section');
try {
$this->dispatcher->dispatch($event, $eventName);
} finally {
if ($e->isStarted()) {
$e->stop();
}
}
*/
private function filterResponse(Response $response, Request $request, int $type): Response
{
$event = new ResponseEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::RESPONSE);
$this->finishRequest($request, $type);
return $event->getResponse();
}
$response->setStatusCode(500);
}
}
try {
return $this->filterResponse($response, $request, $type);
} catch (\Exception $e) {
return $response;
}
}
$this->finishRequest($request, $type);
throw $e;
}
return $this->handleThrowable($e, $request, $type);
} finally {
$this->requestStack->pop();
}
}
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
$kernel = \Pimcore\Bootstrap::kernel();
// reset current request - will be read from request stack from now on
Tool::setCurrentRequest(null);
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
No log messages
[2/2]
NotFoundHttpException
|
---|
Symfony\Component\HttpKernel\Exception\NotFoundHttpException: No route found for "GET https://staging.buerkle.de/ja/ru/interesnoe/pravilnyy-probootbor" at vendor/symfony/http-kernel/EventListener/RouterListener.php:135 at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(RequestEvent)) (vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(RequestEvent), 'kernel.request') (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(RequestEvent), 'kernel.request') (vendor/symfony/http-kernel/HttpKernel.php:139) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request)) (vendor/diepartments/virtual-translation-bundle/src/Service/TranslationService.php:334) at DiePartments\VirtualTranslationBundle\Service\TranslationService->fetchContentFromFallbackUrl(object(Request), 'ja', 'ja') (vendor/diepartments/virtual-translation-bundle/src/Service/TranslationService.php:316) at DiePartments\VirtualTranslationBundle\Service\TranslationService->getOriginalContent(object(Request), object(Response), 'ja', 'ja') (vendor/diepartments/virtual-translation-bundle/src/Service/TranslationService.php:60) at DiePartments\VirtualTranslationBundle\Service\TranslationService->handleTranslation(object(Request), object(Response), 'ja', 'ja') (vendor/diepartments/virtual-translation-bundle/src/EventListener/TranslationListener.php:53) at DiePartments\VirtualTranslationBundle\EventListener\TranslationListener->onKernelResponse(object(ResponseEvent), 'kernel.response', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ResponseEvent), 'kernel.response', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.response', object(ResponseEvent)) (vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(ResponseEvent), 'kernel.response') (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(ResponseEvent), 'kernel.response') (vendor/symfony/http-kernel/HttpKernel.php:196) at Symfony\Component\HttpKernel\HttpKernel->filterResponse(object(Response), object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:249) at Symfony\Component\HttpKernel\HttpKernel->handleThrowable(object(NotFoundHttpException), object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:86) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:36) |
[1/2]
ResourceNotFoundException
|
---|
Symfony\Component\Routing\Exception\ResourceNotFoundException: None of the routers in the chain matched this request GET /ja/ru/interesnoe/pravilnyy-probootbor HTTP/1.1 Accept: */* Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7 Accept-Encoding: gzip, br, zstd, deflate Accept-Language: ja-us,ja;q=0.5 Host: staging.buerkle.de User-Agent: Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) X-Forwarded-For: 10.100.0.0 X-Forwarded-Host: staging.buerkle.de X-Forwarded-Port: 443 X-Forwarded-Proto: https X-Forwarded-Scheme: https X-Php-Ob-Level: 0 X-Real-Ip: 10.100.0.0 X-Request-Id: 674d817d9b52e3807605243687b54659 X-Scheme: https at vendor/symfony-cmf/routing/src/ChainRouter.php:210 at Symfony\Cmf\Component\Routing\ChainRouter->doMatch('/ja/ru/interesnoe/pravilnyy-probootbor', object(Request)) (vendor/symfony-cmf/routing/src/ChainRouter.php:158) at Symfony\Cmf\Component\Routing\ChainRouter->matchRequest(object(Request)) (vendor/symfony/http-kernel/EventListener/RouterListener.php:111) at Symfony\Component\HttpKernel\EventListener\RouterListener->onKernelRequest(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(RequestEvent), 'kernel.request', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.request', object(RequestEvent)) (vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(RequestEvent), 'kernel.request') (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(RequestEvent), 'kernel.request') (vendor/symfony/http-kernel/HttpKernel.php:139) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:75) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request)) (vendor/diepartments/virtual-translation-bundle/src/Service/TranslationService.php:334) at DiePartments\VirtualTranslationBundle\Service\TranslationService->fetchContentFromFallbackUrl(object(Request), 'ja', 'ja') (vendor/diepartments/virtual-translation-bundle/src/Service/TranslationService.php:316) at DiePartments\VirtualTranslationBundle\Service\TranslationService->getOriginalContent(object(Request), object(Response), 'ja', 'ja') (vendor/diepartments/virtual-translation-bundle/src/Service/TranslationService.php:60) at DiePartments\VirtualTranslationBundle\Service\TranslationService->handleTranslation(object(Request), object(Response), 'ja', 'ja') (vendor/diepartments/virtual-translation-bundle/src/EventListener/TranslationListener.php:53) at DiePartments\VirtualTranslationBundle\EventListener\TranslationListener->onKernelResponse(object(ResponseEvent), 'kernel.response', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:118) at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ResponseEvent), 'kernel.response', object(TraceableEventDispatcher)) (vendor/symfony/event-dispatcher/EventDispatcher.php:230) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.response', object(ResponseEvent)) (vendor/symfony/event-dispatcher/EventDispatcher.php:59) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(ResponseEvent), 'kernel.response') (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154) at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(ResponseEvent), 'kernel.response') (vendor/symfony/http-kernel/HttpKernel.php:196) at Symfony\Component\HttpKernel\HttpKernel->filterResponse(object(Response), object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:249) at Symfony\Component\HttpKernel\HttpKernel->handleThrowable(object(NotFoundHttpException), object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:86) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:202) at Symfony\Component\HttpKernel\Kernel->handle(object(Request)) (public/index.php:36) |