Shopware\Core\Content\Cms\Exception\PageNotFoundException {#4623 -statusCode: 404 -headers: [] #parameters: array:1 [ "pageId" => "1d2b4953711d44e8a81395cfe593ed80" ] }
}
$pages = $this->cmsPageLoader->load($request, $criteria, $context);
if (!$pages->has($id)) {
throw new PageNotFoundException($id);
}
return new CmsRouteResponse($pages->get($id));
}
}
{
if (!$id) {
throw RoutingException::missingRequestParameter('id');
}
$page = $this->cmsRoute->load($id, $request, $salesChannelContext)->getCmsPage();
$this->hook(new CmsPageLoadedHook($page, $salesChannelContext));
$response = $this->renderStorefront('@Storefront/storefront/page/content/detail.html.twig', ['cmsPage' => $page]);
$response->headers->set('x-robots-tag', 'noindex');
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response, $event);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
$this->requestStack->push($request);
$response = null;
try {
return $response = $this->handleRaw($request, $type);
} catch (\Throwable $e) {
if ($e instanceof \Error && !$this->handleAllThrowables) {
throw $e;
}
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) {
Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet());
}
try {
return $kernel->handle($request, $type, $catch);
} finally {
// restore global state
Request::setTrustedProxies($trustedProxies, $trustedHeaderSet);
}
}
protected function forward(Request $request, bool $catch = false, Response $entry = null)
{
$this->surrogate?->addSurrogateCapability($request);
// always a "master" request (as the real master request can be in cache)
$response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MAIN_REQUEST, $catch);
/*
* Support stale-if-error given on Responses or as a config option.
* RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual
* Cache-Control directives) that
// avoid that the backend sends no content
$subRequest->headers->remove('If-Modified-Since');
$subRequest->headers->remove('If-None-Match');
$response = $this->forward($subRequest, $catch);
if ($response->isCacheable()) {
$this->store($request, $response);
}
}
if (null === $entry) {
$this->record($request, 'miss');
return $this->fetch($request, $catch);
}
if (!$this->isFreshEnough($request, $entry)) {
$this->record($request, 'stale');
reload the cache by fetching a fresh response and caching it (if possible).
*/
$this->record($request, 'reload');
$response = $this->fetch($request, $catch);
} else {
$response = $this->lookup($request, $catch);
}
$this->restoreResponseBody($request, $response);
if (HttpKernelInterface::MAIN_REQUEST === $type) {
&& $container->getParameter('shopware.http.cache.enabled');
if ($enabled && $container->has(CacheStore::class)) {
$kernel = new static::$httpCacheClass($kernel, $container->get(CacheStore::class), null, ['debug' => $this->debug]);
}
$response = $kernel->handle($transformed, $type, $catch);
// fire event to trigger runtime events like seo url headers
$event = new BeforeSendResponseEvent($transformed, $response);
$container->get('event_dispatcher')->dispatch($event);
}
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): HttpKernelResult
{
try {
return $this->doHandle($request, $type, $catch);
} catch (Exception $e) {
/** @var Params|array{url?: string} $connectionParams */
$connectionParams = self::getConnection()->getParams();
$message = str_replace([$connectionParams['url'] ?? null, $connectionParams['password'] ?? null, $connectionParams['user'] ?? null], '******', $e->getMessage());
$this->httpKernel = $httpKernel;
}
public function handle(Request $request, int $type = self::MAIN_REQUEST, bool $catch = true): Response
{
return $this->httpKernel->handle($request, $type, $catch)->getResponse();
}
public function terminate(Request $request, Response $response): void
{
$this->httpKernel->terminate($request, $response);
$this->request = $request;
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
$response->send();
if ($this->kernel instanceof TerminableInterface) {
$this->kernel->terminate($this->request, $response);
}
$app = $app(...$args);
exit(
$runtime
->getRunner($app)
->run()
);
use Symfony\Component\HttpKernel\HttpKernelInterface;
use Symfony\Component\HttpKernel\TerminableInterface;
$_SERVER['SCRIPT_FILENAME'] = __FILE__;
require_once __DIR__ . '/../vendor/autoload_runtime.php';
if (!file_exists(__DIR__ . '/../.env') && !file_exists(__DIR__ . '/../.env.dist') && !file_exists(__DIR__ . '/../.env.local.php')) {
$_SERVER['APP_RUNTIME_OPTIONS']['disable_dotenv'] = true;
}
No log messages
PageNotFoundException
|
---|
Shopware\Core\Content\Cms\Exception\PageNotFoundException: Page with id "1d2b4953711d44e8a81395cfe593ed80" was not found. at vendor/shopware/core/Content/Cms/SalesChannel/CmsRoute.php:50 at Shopware\Core\Content\Cms\SalesChannel\CmsRoute->load('1d2b4953711d44e8a81395cfe593ed80', object(Request), object(SalesChannelContext)) (vendor/shopware/storefront/Controller/CmsController.php:53) at Shopware\Storefront\Controller\CmsController->page('1d2b4953711d44e8a81395cfe593ed80', object(Request), object(SalesChannelContext)) (vendor/symfony/http-kernel/HttpKernel.php:181) at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1) (vendor/symfony/http-kernel/HttpKernel.php:76) at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/Kernel.php:197) at Symfony\Component\HttpKernel\Kernel->handle(object(Request), 1, true) (vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:86) at Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle(object(Kernel), object(Request), 1, true) (vendor/symfony/http-kernel/HttpCache/HttpCache.php:473) at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward(object(Request), true) (vendor/symfony/http-kernel/HttpCache/HttpCache.php:448) at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch(object(Request), true) (vendor/symfony/http-kernel/HttpCache/HttpCache.php:346) at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup(object(Request), true) (vendor/symfony/http-kernel/HttpCache/HttpCache.php:221) at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle(object(Request), 1, true) (vendor/shopware/core/HttpKernel.php:143) at Shopware\Core\HttpKernel->doHandle(object(Request), 1, true) (vendor/shopware/core/HttpKernel.php:65) at Shopware\Core\HttpKernel->handle(object(Request), 1, true) (public/index.php:71) at Symfony\Component\HttpKernel\HttpKernelInterface@anonymous /var/www/virtual/upside/upsideshop/public/index.php:61$0->handle(object(Request)) (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/virtual/upside/upsideshop/vendor/autoload_runtime.php') (public/index.php:14) |