Shopware\Core\Content\Category\Exception\CategoryNotFoundException {#2678 -statusCode: 404 -headers: [] #parameters: array:1 [ "categoryId" => "2190cc552b4d452aa98457b4b301e679" ] }
return new PageNotFoundException($pageId);
}
public static function categoryNotFound(string $id): ShopwareHttpException
{
return new CategoryNotFoundException($id);
}
public static function serviceCategoryNotFoundForSalesChannel(string $salesChannelName): self
{
return new self(
* @return CategoryMetaInformation
*/
private function getMetaInfoById(string $id, array $metaInfo): array
{
if (!\array_key_exists($id, $metaInfo)) {
throw CategoryException::categoryNotFound($id);
}
return $metaInfo[$id];
}
): NavigationRouteResponse {
$depth = $request->query->getInt('depth', $request->request->getInt('depth', 2));
$metaInfo = $this->getCategoryMetaInfo($activeId, $rootId);
$active = $this->getMetaInfoById($activeId, $metaInfo);
$root = $this->getMetaInfoById($rootId, $metaInfo);
// Validate the provided category is part of the sales channel
$this->validate($activeId, $active['path'], $context);
$value = $this->cache->get($key, function (ItemInterface $item) use ($active, $depth, $rootId, $request, $context, $criteria, $tags) {
$request->query->set('depth', (string) $depth);
$name = self::buildName($active);
$response = $this->tracer->trace($name, fn () => $this->getDecorated()->load($active, $rootId, $request, $context, $criteria));
$item->tag($this->generateTags($tags, $active, $rootId, $depth, $request, $response, $context, $criteria));
return CacheValueCompressor::compress($response);
});
public function trace(string $key, \Closure $param)
{
$this->traces[$key] = [];
$this->keys[$key] = true;
$result = $param();
unset($this->keys[$key]);
return $result;
}
throw new DecorationPatternException(self::class);
}
public function trace(string $key, \Closure $param)
{
return $this->collection->trace($key, fn () => $this->translator->trace($key, fn () => $this->config->trace($key, $param)));
}
public function get(string $key): array
{
return array_merge(
public function trace(string $key, \Closure $param)
{
$this->traces[$key] = [];
$this->keys[$key] = true;
$result = $param();
unset($this->keys[$key]);
return $result;
}
throw new DecorationPatternException(self::class);
}
public function trace(string $key, \Closure $param)
{
return $this->collection->trace($key, fn () => $this->translator->trace($key, fn () => $this->config->trace($key, $param)));
}
public function get(string $key): array
{
return array_merge(
public function trace(string $key, \Closure $param)
{
$this->traces[$key] = [];
$this->keys[$key] = true;
$result = $param();
unset($this->keys[$key]);
return $result;
}
throw new DecorationPatternException(self::class);
}
public function trace(string $key, \Closure $param)
{
return $this->collection->trace($key, fn () => $this->translator->trace($key, fn () => $this->config->trace($key, $param)));
}
public function get(string $key): array
{
return array_merge(
return $this->decorated;
}
public function trace(string $key, \Closure $param)
{
return $this->themeConfigAccessor->trace($key, fn () => $this->getDecorated()->trace($key, $param));
}
public function get(string $key): array
{
return array_unique(array_merge(
public function trace(string $key, \Closure $param)
{
$this->traces[$key] = [];
$this->keys[$key] = true;
$result = $param();
unset($this->keys[$key]);
return $result;
}
return $this->decorated;
}
public function trace(string $key, \Closure $param)
{
return $this->themeConfigAccessor->trace($key, fn () => $this->getDecorated()->trace($key, $param));
}
public function get(string $key): array
{
return array_unique(array_merge(
$value = $this->cache->get($key, function (ItemInterface $item) use ($active, $depth, $rootId, $request, $context, $criteria, $tags) {
$request->query->set('depth', (string) $depth);
$name = self::buildName($active);
$response = $this->tracer->trace($name, fn () => $this->getDecorated()->load($active, $rootId, $request, $context, $criteria));
$item->tag($this->generateTags($tags, $active, $rootId, $depth, $request, $response, $context, $criteria));
return CacheValueCompressor::compress($response);
});
}
}
if ($recompute) {
$save = true;
$item->set($callback($item, $save));
if ($save) {
$pool->save($item);
}
}
/**
* {@inheritdoc}
*/
public function get(string $key, callable $callback, float $beta = null, array &$metadata = null): mixed
{
return $this->doGet($this, $key, $callback, $beta, $metadata);
}
/**
* {@inheritdoc}
*/
$response = $this->tracer->trace($name, fn () => $this->getDecorated()->load($active, $rootId, $request, $context, $criteria));
$item->tag($this->generateTags($tags, $active, $rootId, $depth, $request, $response, $context, $criteria));
return CacheValueCompressor::compress($response);
});
return CacheValueCompressor::uncompress($value);
}
private function isActiveLoaded(string $root, CategoryCollection $categories, string $activeId): bool
if ($this->isActiveLoaded($rootId, $response->getCategories(), $activeId)) {
return $response;
}
// reload missing children of active category, depth 0 allows us the skip base navigation loading in the core route
$active = $this->loadNavigation($request, $activeId, $rootId, 0, $context, $criteria, [self::ALL_TAG]);
$response->getCategories()->merge($active->getCategories());
return $response;
});
try {
foreach (self::$profilers as $profiler) {
$profiler->start($name, $category, $tags);
}
$result = $closure();
} finally {
foreach (self::$profilers as $profiler) {
$profiler->stop($name);
}
}
$active = $this->loadNavigation($request, $activeId, $rootId, 0, $context, $criteria, [self::ALL_TAG]);
$response->getCategories()->merge($active->getCategories());
return $response;
});
}
public static function buildName(string $id): string
{
return 'navigation-route-' . $id;
{
$activeId = $this->resolveAliasId($activeId, $context->getSalesChannel());
$rootId = $this->resolveAliasId($rootId, $context->getSalesChannel());
$response = $this->getDecorated()->load($activeId, $rootId, $request, $context, $criteria);
$buildTree = $request->query->getBoolean('buildTree', $request->request->getBoolean('buildTree', true));
if (!$buildTree) {
return $response;
$criteria = new Criteria();
$criteria->setTitle('header::navigation');
$categories = $this->navigationRoute
->load($activeId, $rootId, $request, $context, $criteria)
->getCategories();
$navigation = $this->getTree($rootId, $categories, $categories->get($activeId));
$event = new NavigationLoadedEvent($navigation, $context);
$navigation = $this->navigationLoader->load(
(string) $navigationId,
$context,
$salesChannel->getNavigationCategoryId(),
$salesChannel->getNavigationCategoryDepth()
);
$criteria = new Criteria();
$criteria->setTitle('header::currencies');
);
return $page;
}
$page->setHeader(
$this->headerLoader->load($request, $context)
);
$page->setFooter(
$this->footerLoader->load($request, $context)
);
try {
foreach (self::$profilers as $profiler) {
$profiler->start($name, $category, $tags);
}
$result = $closure();
} finally {
foreach (self::$profilers as $profiler) {
$profiler->stop($name);
}
}
$this->eventDispatcher->dispatch(
new GenericPageLoadedEvent($page, $context, $request)
);
return $page;
});
}
}
) {
}
public function load(Request $request, SalesChannelContext $context): NavigationPage
{
$page = $this->genericLoader->load($request, $context);
$page = NavigationPage::createFrom($page);
$navigationId = $request->get('navigationId', $context->getSalesChannel()->getNavigationCategoryId());
$category = $this->cmsPageRoute
}
#[Route(path: '/navigation/{navigationId}', name: 'frontend.navigation.page', options: ['seo' => true], defaults: ['_httpCache' => true], methods: ['GET'])]
public function index(SalesChannelContext $context, Request $request): Response
{
$page = $this->navigationPageLoader->load($request, $context);
$this->hook(new NavigationPageLoadedHook($page, $context));
return $this->renderStorefront('@Storefront/storefront/page/content/index.html.twig', ['page' => $page]);
}
$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
CategoryNotFoundException
|
---|
Shopware\Core\Content\Category\Exception\CategoryNotFoundException: Category "2190cc552b4d452aa98457b4b301e679" not found. at vendor/shopware/core/Content/Category/CategoryException.php:27 at Shopware\Core\Content\Category\CategoryException::categoryNotFound('2190cc552b4d452aa98457b4b301e679') (vendor/shopware/core/Content/Category/SalesChannel/NavigationRoute.php:151) at Shopware\Core\Content\Category\SalesChannel\NavigationRoute->getMetaInfoById('2190cc552b4d452aa98457b4b301e679', array('c3aac235e074456a8441b31e4ecbb72f' => array('path' => null, 'level' => '1'))) (vendor/shopware/core/Content/Category/SalesChannel/NavigationRoute.php:58) at Shopware\Core\Content\Category\SalesChannel\NavigationRoute->load('2190cc552b4d452aa98457b4b301e679', 'c3aac235e074456a8441b31e4ecbb72f', object(Request), object(SalesChannelContext), object(Criteria)) (vendor/shopware/core/Content/Category/SalesChannel/CachedNavigationRoute.php:102) at Shopware\Core\Content\Category\SalesChannel\CachedNavigationRoute->Shopware\Core\Content\Category\SalesChannel\{closure}() (vendor/shopware/core/System/SystemConfig/SystemConfigService.php:416) at Shopware\Core\System\SystemConfig\SystemConfigService->trace('navigation-route-2190cc552b4d452aa98457b4b301e679', object(Closure)) (vendor/shopware/core/Framework/Adapter/Cache/CacheTracer.php:33) at Shopware\Core\Framework\Adapter\Cache\CacheTracer->Shopware\Core\Framework\Adapter\Cache\{closure}() (vendor/shopware/core/Framework/Adapter/Translation/Translator.php:96) at Shopware\Core\Framework\Adapter\Translation\Translator->trace('navigation-route-2190cc552b4d452aa98457b4b301e679', object(Closure)) (vendor/shopware/core/Framework/Adapter/Cache/CacheTracer.php:33) at Shopware\Core\Framework\Adapter\Cache\CacheTracer->Shopware\Core\Framework\Adapter\Cache\{closure}() (vendor/shopware/core/Framework/Adapter/Cache/CacheTagCollection.php:56) at Shopware\Core\Framework\Adapter\Cache\CacheTagCollection->trace('navigation-route-2190cc552b4d452aa98457b4b301e679', object(Closure)) (vendor/shopware/core/Framework/Adapter/Cache/CacheTracer.php:33) at Shopware\Core\Framework\Adapter\Cache\CacheTracer->trace('navigation-route-2190cc552b4d452aa98457b4b301e679', object(Closure)) (vendor/shopware/storefront/Framework/Cache/CacheTracer.php:33) at Shopware\Storefront\Framework\Cache\CacheTracer->Shopware\Storefront\Framework\Cache\{closure}() (vendor/shopware/storefront/Theme/ThemeConfigValueAccessor.php:76) at Shopware\Storefront\Theme\ThemeConfigValueAccessor->trace('navigation-route-2190cc552b4d452aa98457b4b301e679', object(Closure)) (vendor/shopware/storefront/Framework/Cache/CacheTracer.php:33) at Shopware\Storefront\Framework\Cache\CacheTracer->trace('navigation-route-2190cc552b4d452aa98457b4b301e679', object(Closure)) (vendor/shopware/core/Content/Category/SalesChannel/CachedNavigationRoute.php:102) at Shopware\Core\Content\Category\SalesChannel\CachedNavigationRoute->Shopware\Core\Content\Category\SalesChannel\{closure}(object(CacheItem), true) (vendor/symfony/cache-contracts/CacheTrait.php:70) at Shopware\Core\Framework\Adapter\Cache\CacheDecorator->doGet(object(CacheDecorator), 'navigation-route-2190cc552b4d452aa98457b4b301e679-73a2c6ca8e04557c273f22d488a91805', object(Closure), 1.0, array()) (vendor/symfony/cache-contracts/CacheTrait.php:33) at Shopware\Core\Framework\Adapter\Cache\CacheDecorator->get('navigation-route-2190cc552b4d452aa98457b4b301e679-73a2c6ca8e04557c273f22d488a91805', object(Closure)) (vendor/shopware/core/Content/Category/SalesChannel/CachedNavigationRoute.php:107) at Shopware\Core\Content\Category\SalesChannel\CachedNavigationRoute->loadNavigation(object(Request), '2190cc552b4d452aa98457b4b301e679', 'c3aac235e074456a8441b31e4ecbb72f', 0, object(SalesChannelContext), object(Criteria), array('navigation')) (vendor/shopware/core/Content/Category/SalesChannel/CachedNavigationRoute.php:73) at Shopware\Core\Content\Category\SalesChannel\CachedNavigationRoute->Shopware\Core\Content\Category\SalesChannel\{closure}() (vendor/shopware/core/Profiling/Profiler.php:67) at Shopware\Core\Profiling\Profiler::trace('navigation-route', object(Closure)) (vendor/shopware/core/Content/Category/SalesChannel/CachedNavigationRoute.php:78) at Shopware\Core\Content\Category\SalesChannel\CachedNavigationRoute->load('2190cc552b4d452aa98457b4b301e679', 'c3aac235e074456a8441b31e4ecbb72f', object(Request), object(SalesChannelContext), object(Criteria)) (vendor/shopware/core/Content/Category/SalesChannel/TreeBuildingNavigationRoute.php:38) at Shopware\Core\Content\Category\SalesChannel\TreeBuildingNavigationRoute->load('2190cc552b4d452aa98457b4b301e679', 'c3aac235e074456a8441b31e4ecbb72f', object(Request), object(SalesChannelContext), object(Criteria)) (vendor/shopware/core/Content/Category/Service/NavigationLoader.php:49) at Shopware\Core\Content\Category\Service\NavigationLoader->load('2190cc552b4d452aa98457b4b301e679', object(SalesChannelContext), 'c3aac235e074456a8441b31e4ecbb72f', 6) (vendor/shopware/storefront/Pagelet/Header/HeaderPageletLoader.php:59) at Shopware\Storefront\Pagelet\Header\HeaderPageletLoader->load(object(Request), object(SalesChannelContext)) (vendor/shopware/storefront/Page/GenericPageLoader.php:49) at Shopware\Storefront\Page\GenericPageLoader->Shopware\Storefront\Page\{closure}() (vendor/shopware/core/Profiling/Profiler.php:67) at Shopware\Core\Profiling\Profiler::trace('generic-page-loader', object(Closure)) (vendor/shopware/storefront/Page/GenericPageLoader.php:92) at Shopware\Storefront\Page\GenericPageLoader->load(object(Request), object(SalesChannelContext)) (vendor/shopware/storefront/Page/Navigation/NavigationPageLoader.php:35) at Shopware\Storefront\Page\Navigation\NavigationPageLoader->load(object(Request), object(SalesChannelContext)) (vendor/shopware/storefront/Controller/NavigationController.php:45) at Shopware\Storefront\Controller\NavigationController->index(object(SalesChannelContext), object(Request)) (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 /www/htdocs/w00f8104/shopware6/public/index.php:61$384->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('/www/htdocs/w00f8104/shopware6/vendor/autoload_runtime.php') (public/index.php:14) |