Symfony Exception

CategoryNotFoundException

HTTP 404 Not Found

Category "851bf8a0faaf49958a47ed69307a7173" not found.

Exception

Shopware\Core\Content\Category\Exception\ CategoryNotFoundException

Show exception properties
Shopware\Core\Content\Category\Exception\CategoryNotFoundException {#8034
  -statusCode: 404
  -headers: []
  #parameters: array:1 [
    "categoryId" => "851bf8a0faaf49958a47ed69307a7173"
  ]
}
  1.         return new PageNotFoundException($pageId);
  2.     }
  3.     public static function categoryNotFound(string $id): ShopwareHttpException
  4.     {
  5.         return new CategoryNotFoundException($id);
  6.     }
  7.     public static function serviceCategoryNotFoundForSalesChannel(string $salesChannelName): self
  8.     {
  9.         return new self(
  1.      * @return CategoryMetaInformation
  2.      */
  3.     private function getMetaInfoById(string $id, array $metaInfo): array
  4.     {
  5.         if (!\array_key_exists($id$metaInfo)) {
  6.             throw CategoryException::categoryNotFound($id);
  7.         }
  8.         return $metaInfo[$id];
  9.     }
  1.     ): NavigationRouteResponse {
  2.         $depth $request->query->getInt('depth'$request->request->getInt('depth'2));
  3.         $metaInfo $this->getCategoryMetaInfo($activeId$rootId);
  4.         $active $this->getMetaInfoById($activeId$metaInfo);
  5.         $root $this->getMetaInfoById($rootId$metaInfo);
  6.         // Validate the provided category is part of the sales channel
  7.         $this->validate($activeId$active['path'], $context);
  1.         $value $this->cache->get($key, function (ItemInterface $item) use ($active$depth$rootId$request$context$criteria$tags) {
  2.             $request->query->set('depth', (string) $depth);
  3.             $name self::buildName($active);
  4.             $response $this->tracer->trace($name, fn () => $this->getDecorated()->load($active$rootId$request$context$criteria));
  5.             $item->tag($this->generateTags($tags$active$rootId$depth$request$response$context$criteria));
  6.             return CacheValueCompressor::compress($response);
  7.         });
in vendor/shopware/core/System/SystemConfig/SystemConfigService.php -> Shopware\Core\Content\Category\SalesChannel\{closure} (line 416)
  1.     public function trace(string $key\Closure $param)
  2.     {
  3.         $this->traces[$key] = [];
  4.         $this->keys[$key] = true;
  5.         $result $param();
  6.         unset($this->keys[$key]);
  7.         return $result;
  8.     }
  1.         throw new DecorationPatternException(self::class);
  2.     }
  3.     public function trace(string $key\Closure $param)
  4.     {
  5.         return $this->collection->trace($key, fn () => $this->translator->trace($key, fn () => $this->config->trace($key$param)));
  6.     }
  7.     public function get(string $key): array
  8.     {
  9.         return array_merge(
in vendor/shopware/core/Framework/Adapter/Translation/Translator.php -> Shopware\Core\Framework\Adapter\Cache\{closure} (line 96)
  1.     public function trace(string $key\Closure $param)
  2.     {
  3.         $this->traces[$key] = [];
  4.         $this->keys[$key] = true;
  5.         $result $param();
  6.         unset($this->keys[$key]);
  7.         return $result;
  8.     }
  1.         throw new DecorationPatternException(self::class);
  2.     }
  3.     public function trace(string $key\Closure $param)
  4.     {
  5.         return $this->collection->trace($key, fn () => $this->translator->trace($key, fn () => $this->config->trace($key$param)));
  6.     }
  7.     public function get(string $key): array
  8.     {
  9.         return array_merge(
in vendor/shopware/core/Framework/Adapter/Cache/CacheTagCollection.php -> Shopware\Core\Framework\Adapter\Cache\{closure} (line 56)
  1.     public function trace(string $key\Closure $param)
  2.     {
  3.         $this->traces[$key] = [];
  4.         $this->keys[$key] = true;
  5.         $result $param();
  6.         unset($this->keys[$key]);
  7.         return $result;
  8.     }
  1.         throw new DecorationPatternException(self::class);
  2.     }
  3.     public function trace(string $key\Closure $param)
  4.     {
  5.         return $this->collection->trace($key, fn () => $this->translator->trace($key, fn () => $this->config->trace($key$param)));
  6.     }
  7.     public function get(string $key): array
  8.     {
  9.         return array_merge(
  1.         return $this->decorated;
  2.     }
  3.     public function trace(string $key\Closure $param)
  4.     {
  5.         return $this->themeConfigAccessor->trace($key, fn () => $this->getDecorated()->trace($key$param));
  6.     }
  7.     public function get(string $key): array
  8.     {
  9.         return array_unique(array_merge(
in vendor/shopware/storefront/Theme/ThemeConfigValueAccessor.php -> Shopware\Storefront\Framework\Cache\{closure} (line 76)
  1.     public function trace(string $key\Closure $param)
  2.     {
  3.         $this->traces[$key] = [];
  4.         $this->keys[$key] = true;
  5.         $result $param();
  6.         unset($this->keys[$key]);
  7.         return $result;
  8.     }
  1.         return $this->decorated;
  2.     }
  3.     public function trace(string $key\Closure $param)
  4.     {
  5.         return $this->themeConfigAccessor->trace($key, fn () => $this->getDecorated()->trace($key$param));
  6.     }
  7.     public function get(string $key): array
  8.     {
  9.         return array_unique(array_merge(
  1.         $value $this->cache->get($key, function (ItemInterface $item) use ($active$depth$rootId$request$context$criteria$tags) {
  2.             $request->query->set('depth', (string) $depth);
  3.             $name self::buildName($active);
  4.             $response $this->tracer->trace($name, fn () => $this->getDecorated()->load($active$rootId$request$context$criteria));
  5.             $item->tag($this->generateTags($tags$active$rootId$depth$request$response$context$criteria));
  6.             return CacheValueCompressor::compress($response);
  7.         });
in vendor/symfony/cache-contracts/CacheTrait.php -> Shopware\Core\Content\Category\SalesChannel\{closure} (line 70)
  1.             }
  2.         }
  3.         if ($recompute) {
  4.             $save true;
  5.             $item->set($callback($item$save));
  6.             if ($save) {
  7.                 $pool->save($item);
  8.             }
  9.         }
  1.     /**
  2.      * {@inheritdoc}
  3.      */
  4.     public function get(string $key, callable $callbackfloat $beta null, array &$metadata null): mixed
  5.     {
  6.         return $this->doGet($this$key$callback$beta$metadata);
  7.     }
  8.     /**
  9.      * {@inheritdoc}
  10.      */
  1.         if ($key === null) {
  2.             return $this->getDecorated()->load($active$rootId$request$context$criteria);
  3.         }
  4.         $value $this->cache->get($key, function (ItemInterface $item) use ($active$depth$rootId$request$context$criteria$tags) {
  5.             $request->query->set('depth', (string) $depth);
  6.             $name self::buildName($active);
  7.             $response $this->tracer->trace($name, fn () => $this->getDecorated()->load($active$rootId$request$context$criteria));
  1.             if ($this->isActiveLoaded($rootId$response->getCategories(), $activeId)) {
  2.                 return $response;
  3.             }
  4.             // reload missing children of active category, depth 0 allows us the skip base navigation loading in the core route
  5.             $active $this->loadNavigation($request$activeId$rootId0$context$criteria, [self::ALL_TAG]);
  6.             $response->getCategories()->merge($active->getCategories());
  7.             return $response;
  8.         });
in vendor/shopware/core/Profiling/Profiler.php -> Shopware\Core\Content\Category\SalesChannel\{closure} (line 67)
  1.         try {
  2.             foreach (self::$profilers as $profiler) {
  3.                 $profiler->start($name$category$tags);
  4.             }
  5.             $result $closure();
  6.         } finally {
  7.             foreach (self::$profilers as $profiler) {
  8.                 $profiler->stop($name);
  9.             }
  10.         }
  1.     }
  2.     #[Route(path'/store-api/navigation/{activeId}/{rootId}'name'store-api.navigation'methods: ['GET''POST'], defaults: ['_entity' => 'category'])]
  3.     public function load(string $activeIdstring $rootIdRequest $requestSalesChannelContext $contextCriteria $criteria): NavigationRouteResponse
  4.     {
  5.         return Profiler::trace('navigation-route', function () use ($activeId$rootId$request$context$criteria) {
  6.             if ($context->hasState(...$this->states)) {
  7.                 return $this->getDecorated()->load($activeId$rootId$request$context$criteria);
  8.             }
  9.             $depth $request->query->getInt('depth'$request->request->getInt('depth'2));
  1.     {
  2.         $activeId $this->resolveAliasId($activeId$context->getSalesChannel());
  3.         $rootId $this->resolveAliasId($rootId$context->getSalesChannel());
  4.         $response $this->getDecorated()->load($activeId$rootId$request$context$criteria);
  5.         $buildTree $request->query->getBoolean('buildTree'$request->request->getBoolean('buildTree'true));
  6.         if (!$buildTree) {
  7.             return $response;
  1.         $criteria = new Criteria();
  2.         $criteria->setTitle('header::navigation');
  3.         $categories $this->navigationRoute
  4.             ->load($activeId$rootId$request$context$criteria)
  5.             ->getCategories();
  6.         $navigation $this->getTree($rootId$categories$categories->get($activeId));
  7.         $event = new NavigationLoadedEvent($navigation$context);
  1.         $languages $this->getLanguages($context$request);
  2.         $event = new CurrencyRouteRequestEvent($request, new Request(), $context);
  3.         $this->eventDispatcher->dispatch($event);
  4.         $navigation $this->navigationLoader->load(
  5.             (string) $navigationId,
  6.             $context,
  7.             $salesChannel->getNavigationCategoryId(),
  8.             $salesChannel->getNavigationCategoryDepth()
  9.         );
  1.                 );
  2.                 return $page;
  3.             }
  4.             $page->setHeader(
  5.                 $this->headerLoader->load($request$context)
  6.             );
  7.             $page->setFooter(
  8.                 $this->footerLoader->load($request$context)
  9.             );
in vendor/shopware/core/Profiling/Profiler.php -> Shopware\Storefront\Page\{closure} (line 67)
  1.         try {
  2.             foreach (self::$profilers as $profiler) {
  3.                 $profiler->start($name$category$tags);
  4.             }
  5.             $result $closure();
  6.         } finally {
  7.             foreach (self::$profilers as $profiler) {
  8.                 $profiler->stop($name);
  9.             }
  10.         }
  1.     ) {
  2.     }
  3.     public function load(Request $requestSalesChannelContext $context): Page
  4.     {
  5.         return Profiler::trace('generic-page-loader', function () use ($request$context) {
  6.             $page = new Page();
  7.             $page->setMetaInformation((new MetaInformation())->assign([
  8.                 'revisit' => '15 days',
  9.                 'robots' => 'index,follow',
  1.         } else {
  2.             $acceptedCookies $this->replaceRegexSigns($this->convertCookieGroupsToAcceptedString($cookieGroupsfalse$deniedCookieGroups$deniedCookies));
  3.         }
  4.         $acceptedCookies $this->addExpectedCookies($acceptedCookies$this->cookieService::EXPECTED_COOKIES);
  5.         $page $this->genericPageLoader->load($request$salesChannelContext);
  6.         $page->addExtension('acrisCookieConsent', new ArrayEntity([
  7.             'hasAccepted' => $hasAccepted,
  8.             'cookieGroups' => $cookieGroups,
  9.             'acceptedCookies' => $acceptedCookies,
  1.     ) {
  2.     }
  3.     public function load(Request $requestSalesChannelContext $context): NavigationPage
  4.     {
  5.         $page $this->genericLoader->load($request$context);
  6.         $page NavigationPage::createFrom($page);
  7.         $navigationId $request->get('navigationId'$context->getSalesChannel()->getNavigationCategoryId());
  8.         $category $this->cmsPageRoute
  1.     }
  2.     #[Route(path'/navigation/{navigationId}'name'frontend.navigation.page'options: ['seo' => true], defaults: ['_httpCache' => true], methods: ['GET'])]
  3.     public function index(SalesChannelContext $contextRequest $request): Response
  4.     {
  5.         $page $this->navigationPageLoader->load($request$context);
  6.         $this->hook(new NavigationPageLoadedHook($page$context));
  7.         return $this->renderStorefront('@Storefront/storefront/page/content/index.html.twig', ['page' => $page]);
  8.     }
  1.         $this->dispatcher->dispatch($eventKernelEvents::CONTROLLER_ARGUMENTS);
  2.         $controller $event->getController();
  3.         $arguments $event->getArguments();
  4.         // call controller
  5.         $response $controller(...$arguments);
  6.         // view
  7.         if (!$response instanceof Response) {
  8.             $event = new ViewEvent($this$request$type$response$event);
  9.             $this->dispatcher->dispatch($eventKernelEvents::VIEW);
  1.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  2.         $this->requestStack->push($request);
  3.         $response null;
  4.         try {
  5.             return $response $this->handleRaw($request$type);
  6.         } catch (\Throwable $e) {
  7.             if ($e instanceof \Error && !$this->handleAllThrowables) {
  8.                 throw $e;
  9.             }
  1.     }
  2.     public function handle(Request $requestint $type HttpKernelInterface::MAIN_REQUESTbool $catch true): Response
  3.     {
  4.         if (!KernelFactory::$active) {
  5.             return parent::handle($request$type$catch);
  6.         }
  7.         if ($request->attributes->get('exception') !== null) {
  8.             return parent::handle($request$type$catch);
  9.         }
  1.     }
  2.     public function handle(Request $requestint $type HttpKernelInterface::MAIN_REQUESTbool $catch true): Response
  3.     {
  4.         if (!KernelFactory::$active) {
  5.             return $this->getKernel()->handle($request$type$catch);
  6.         }
  7.         /**
  8.          * When we have an external reverse proxy which is ESI capable, we can't use the internal HttpCache, as it will resolve the ESI tags
  9.          */
in vendor/shopware/core/Kernel.php -> handle (line 157)
  1.     {
  2.         if (!$this->booted) {
  3.             $this->boot();
  4.         }
  5.         return $this->getHttpKernel()->handle($request$type$catch);
  6.     }
  7.     public function boot(): void
  8.     {
  9.         if ($this->booted === true) {
  1.             && $container->getParameter('shopware.http.cache.enabled');
  2.         if ($enabled && $container->has(CacheStore::class)) {
  3.             $kernel = new static::$httpCacheClass($kernel$container->get(CacheStore::class), null, ['debug' => $this->debug]);
  4.         }
  5.         $response $kernel->handle($transformed$type$catch);
  6.         // fire event to trigger runtime events like seo url headers
  7.         $event = new BeforeSendResponseEvent($transformed$response);
  8.         $container->get('event_dispatcher')->dispatch($event);
in vendor/shopware/core/HttpKernel.php -> doHandle (line 67)
  1.     }
  2.     public function handle(Request $requestint $type HttpKernelInterface::MAIN_REQUESTbool $catch true): HttpKernelResult
  3.     {
  4.         try {
  5.             return $this->doHandle($request$type$catch);
  6.         } catch (Exception $e) {
  7.             /** @var Params|array{url?: string} $connectionParams */
  8.             $connectionParams self::getConnection()->getParams();
  9.             $message str_replace([$connectionParams['url'] ?? null$connectionParams['password'] ?? null$connectionParams['user'] ?? null], '******'$e->getMessage());
HttpKernel->handle(object(Request)) in public/index.php (line 85)
  1.     }
  2. } else {
  3.     $kernel = new InstallerKernel($appEnv$debug);
  4. }
  5. $result $kernel->handle($request);
  6. if ($result instanceof Response) {
  7.     $result->send();
  8.     $kernel->terminate($request$result);
  9. } else {

Logs

No log messages

Stack Trace

CategoryNotFoundException
Shopware\Core\Content\Category\Exception\CategoryNotFoundException:
Category "851bf8a0faaf49958a47ed69307a7173" not found.

  at vendor/shopware/core/Content/Category/CategoryException.php:27
  at Shopware\Core\Content\Category\CategoryException::categoryNotFound('851bf8a0faaf49958a47ed69307a7173')
     (vendor/shopware/core/Content/Category/SalesChannel/NavigationRoute.php:151)
  at Shopware\Core\Content\Category\SalesChannel\NavigationRoute->getMetaInfoById('851bf8a0faaf49958a47ed69307a7173', array('4c59a9b05ba241aa917fd37ca38412cb' => array('path' => null, 'level' => '1')))
     (vendor/shopware/core/Content/Category/SalesChannel/NavigationRoute.php:58)
  at Shopware\Core\Content\Category\SalesChannel\NavigationRoute->load('851bf8a0faaf49958a47ed69307a7173', '4c59a9b05ba241aa917fd37ca38412cb', 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-851bf8a0faaf49958a47ed69307a7173', 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-851bf8a0faaf49958a47ed69307a7173', 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-851bf8a0faaf49958a47ed69307a7173', object(Closure))
     (vendor/shopware/core/Framework/Adapter/Cache/CacheTracer.php:33)
  at Shopware\Core\Framework\Adapter\Cache\CacheTracer->trace('navigation-route-851bf8a0faaf49958a47ed69307a7173', object(Closure))
     (vendor/shopware/storefront/Framework/Cache/CacheTracer.php:35)
  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-851bf8a0faaf49958a47ed69307a7173', object(Closure))
     (vendor/shopware/storefront/Framework/Cache/CacheTracer.php:35)
  at Shopware\Storefront\Framework\Cache\CacheTracer->trace('navigation-route-851bf8a0faaf49958a47ed69307a7173', 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-851bf8a0faaf49958a47ed69307a7173-538912a071e88884ecddbcb4380c3e49', object(Closure), 1.0, array())
     (vendor/symfony/cache-contracts/CacheTrait.php:33)
  at Shopware\Core\Framework\Adapter\Cache\CacheDecorator->get('navigation-route-851bf8a0faaf49958a47ed69307a7173-538912a071e88884ecddbcb4380c3e49', object(Closure))
     (vendor/shopware/core/Content/Category/SalesChannel/CachedNavigationRoute.php:97)
  at Shopware\Core\Content\Category\SalesChannel\CachedNavigationRoute->loadNavigation(object(Request), '851bf8a0faaf49958a47ed69307a7173', '4c59a9b05ba241aa917fd37ca38412cb', 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:57)
  at Shopware\Core\Content\Category\SalesChannel\CachedNavigationRoute->load('851bf8a0faaf49958a47ed69307a7173', '4c59a9b05ba241aa917fd37ca38412cb', object(Request), object(SalesChannelContext), object(Criteria))
     (vendor/shopware/core/Content/Category/SalesChannel/TreeBuildingNavigationRoute.php:38)
  at Shopware\Core\Content\Category\SalesChannel\TreeBuildingNavigationRoute->load('851bf8a0faaf49958a47ed69307a7173', '4c59a9b05ba241aa917fd37ca38412cb', object(Request), object(SalesChannelContext), object(Criteria))
     (vendor/shopware/core/Content/Category/Service/NavigationLoader.php:49)
  at Shopware\Core\Content\Category\Service\NavigationLoader->load('851bf8a0faaf49958a47ed69307a7173', object(SalesChannelContext), '4c59a9b05ba241aa917fd37ca38412cb', 3)
     (vendor/shopware/storefront/Pagelet/Header/HeaderPageletLoader.php:55)
  at Shopware\Storefront\Pagelet\Header\HeaderPageletLoader->load(object(Request), object(SalesChannelContext))
     (vendor/shopware/storefront/Page/GenericPageLoader.php:56)
  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:38)
  at Shopware\Storefront\Page\GenericPageLoader->load(object(Request), object(SalesChannelContext))
     (vendor/store.shopware.com/acriscookieconsentcs/src/Storefront/Page/GenericPageLoader.php:92)
  at Acris\CookieConsent\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/shopware/core/Framework/Adapter/Kernel/HttpKernel.php:44)
  at Shopware\Core\Framework\Adapter\Kernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/shopware/core/Framework/Adapter/Kernel/HttpCacheKernel.php:50)
  at Shopware\Core\Framework\Adapter\Kernel\HttpCacheKernel->handle(object(Request), 1, true)
     (vendor/shopware/core/Kernel.php:157)
  at Shopware\Core\Kernel->handle(object(Request), 1, true)
     (vendor/shopware/core/HttpKernel.php:146)
  at Shopware\Core\HttpKernel->doHandle(object(Request), 1, true)
     (vendor/shopware/core/HttpKernel.php:67)
  at Shopware\Core\HttpKernel->handle(object(Request))
     (public/index.php:85)