Shopware\Core\Content\Category\Exception\CategoryNotFoundException {#4616 -statusCode: 404 -headers: [] #parameters: array:1 [ "categoryId" => "7d211d3add8f418fa632247d7b1a3390" ] }
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(
FROM `category`
WHERE `id` = :activeId OR `parent_id` = :activeId OR `id` = :rootId
', ['activeId' => Uuid::fromHexToBytes($activeId), 'rootId' => Uuid::fromHexToBytes($rootId)]);
if (!$result) {
throw CategoryException::categoryNotFound($activeId);
}
return FetchModeHelper::groupUnique($result);
}
SalesChannelContext $context,
Criteria $criteria
): 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);
$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}
*/
if ($key === null) {
return $this->getDecorated()->load($active, $rootId, $request, $context, $criteria);
}
$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));
}
$depth = $request->query->getInt('depth', $request->request->getInt('depth', 2));
// first we load the base navigation, the base navigation is shared for all storefront listings
$response = $this->loadNavigation($request, $rootId, $rootId, $depth, $context, $criteria, [self::ALL_TAG, self::BASE_NAVIGATION_TAG]);
// no we have to check if the active category is loaded and the children of the active category are loaded
if ($this->isActiveLoaded($rootId, $response->getCategories(), $activeId)) {
return $response;
}
try {
foreach (self::$profilers as $profiler) {
$profiler->start($name, $category, $tags);
}
$result = $closure();
} finally {
foreach (self::$profilers as $profiler) {
$profiler->stop($name);
}
}
}
#[Route(path: '/store-api/navigation/{activeId}/{rootId}', name: 'store-api.navigation', methods: ['GET', 'POST'], defaults: ['_entity' => 'category'])]
public function load(string $activeId, string $rootId, Request $request, SalesChannelContext $context, Criteria $criteria): NavigationRouteResponse
{
return Profiler::trace('navigation-route', function () use ($activeId, $rootId, $request, $context, $criteria) {
if ($context->hasState(...$this->states)) {
return $this->getDecorated()->load($activeId, $rootId, $request, $context, $criteria);
}
$depth = $request->query->getInt('depth', $request->request->getInt('depth', 2));
{
$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);
$navigationId = (string) $request->query->get('navigationId', $context->getSalesChannel()->getNavigationCategoryId());
if (!$navigationId) {
throw RoutingException::missingRequestParameter('navigationId');
}
$navigation = $this->navigationLoader->load($navigationId, $context, $navigationId, 1);
$pagelet = new MenuOffcanvasPagelet($navigation);
$this->eventDispatcher->dispatch(
new MenuOffcanvasPageletLoadedEvent($pagelet, $context, $request)
}
#[Route(path: '/widgets/menu/offcanvas', name: 'frontend.menu.offcanvas', defaults: ['XmlHttpRequest' => true, '_httpCache' => true], methods: ['GET'])]
public function offcanvas(Request $request, SalesChannelContext $context): Response
{
$page = $this->offcanvasLoader->load($request, $context);
$this->hook(new MenuOffcanvasPageletLoadedHook($page, $context));
$response = $this->renderStorefront(
'@Storefront/storefront/layout/navigation/offcanvas/navigation-pagelet.html.twig',
$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;
}
}
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response
{
if (!KernelFactory::$active) {
return parent::handle($request, $type, $catch);
}
if ($request->attributes->get('exception') !== null) {
return parent::handle($request, $type, $catch);
}
}
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true): Response
{
if (!KernelFactory::$active) {
return $this->getKernel()->handle($request, $type, $catch);
}
/**
* 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
*/
{
if (!$this->booted) {
$this->boot();
}
return $this->getHttpKernel()->handle($request, $type, $catch);
}
public function boot(): void
{
if ($this->booted === true) {
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);
) {
}
public function run(): int
{
$response = $this->kernel->handle($this->request);
if (Kernel::VERSION_ID >= 60400) {
$response->send(false);
if (\function_exists('fastcgi_finish_request') && !$this->debug) {
$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 "7d211d3add8f418fa632247d7b1a3390" not found. at vendor/shopware/core/Content/Category/CategoryException.php:27 at Shopware\Core\Content\Category\CategoryException::categoryNotFound() (vendor/shopware/core/Content/Category/SalesChannel/NavigationRoute.php:137) at Shopware\Core\Content\Category\SalesChannel\NavigationRoute->getCategoryMetaInfo() (vendor/shopware/core/Content/Category/SalesChannel/NavigationRoute.php:56) at Shopware\Core\Content\Category\SalesChannel\NavigationRoute->load() (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() (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() (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() (vendor/shopware/core/Framework/Adapter/Cache/CacheTracer.php:33) at Shopware\Core\Framework\Adapter\Cache\CacheTracer->trace() (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() (vendor/shopware/storefront/Framework/Cache/CacheTracer.php:35) at Shopware\Storefront\Framework\Cache\CacheTracer->trace() (vendor/shopware/core/Content/Category/SalesChannel/CachedNavigationRoute.php:102) at Shopware\Core\Content\Category\SalesChannel\CachedNavigationRoute->Shopware\Core\Content\Category\SalesChannel\{closure}() (vendor/symfony/cache-contracts/CacheTrait.php:70) at Shopware\Core\Framework\Adapter\Cache\CacheDecorator->doGet() (vendor/symfony/cache-contracts/CacheTrait.php:33) at Shopware\Core\Framework\Adapter\Cache\CacheDecorator->get() (vendor/shopware/core/Content/Category/SalesChannel/CachedNavigationRoute.php:97) at Shopware\Core\Content\Category\SalesChannel\CachedNavigationRoute->loadNavigation() (vendor/shopware/core/Content/Category/SalesChannel/CachedNavigationRoute.php:65) 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() (vendor/shopware/core/Content/Category/SalesChannel/CachedNavigationRoute.php:57) at Shopware\Core\Content\Category\SalesChannel\CachedNavigationRoute->load() (vendor/shopware/core/Content/Category/SalesChannel/TreeBuildingNavigationRoute.php:38) at Shopware\Core\Content\Category\SalesChannel\TreeBuildingNavigationRoute->load() (vendor/shopware/core/Content/Category/Service/NavigationLoader.php:49) at Shopware\Core\Content\Category\Service\NavigationLoader->load() (vendor/shopware/storefront/Pagelet/Menu/Offcanvas/MenuOffcanvasPageletLoader.php:41) at Shopware\Storefront\Pagelet\Menu\Offcanvas\MenuOffcanvasPageletLoader->load() (vendor/shopware/storefront/Controller/NavigationController.php:55) at Shopware\Storefront\Controller\NavigationController->offcanvas() (vendor/symfony/http-kernel/HttpKernel.php:181) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:76) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/shopware/core/Framework/Adapter/Kernel/HttpKernel.php:44) at Shopware\Core\Framework\Adapter\Kernel\HttpKernel->handle() (vendor/shopware/core/Framework/Adapter/Kernel/HttpCacheKernel.php:50) at Shopware\Core\Framework\Adapter\Kernel\HttpCacheKernel->handle() (vendor/shopware/core/Kernel.php:157) at Shopware\Core\Kernel->handle() (vendor/symfony/http-kernel/HttpCache/SubRequestHandler.php:86) at Symfony\Component\HttpKernel\HttpCache\SubRequestHandler::handle() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:473) at Symfony\Component\HttpKernel\HttpCache\HttpCache->forward() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:448) at Symfony\Component\HttpKernel\HttpCache\HttpCache->fetch() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:346) at Symfony\Component\HttpKernel\HttpCache\HttpCache->lookup() (vendor/symfony/http-kernel/HttpCache/HttpCache.php:221) at Symfony\Component\HttpKernel\HttpCache\HttpCache->handle() (vendor/shopware/core/HttpKernel.php:146) at Shopware\Core\HttpKernel->doHandle() (vendor/shopware/core/HttpKernel.php:67) at Shopware\Core\HttpKernel->handle() (public/index.php:71) at Symfony\Component\HttpKernel\HttpKernelInterface@anonymous /home/studugcq/sw6/public/index.php:61$0->handle() (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35) at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run() (vendor/autoload_runtime.php:29) at require_once('/home/studugcq/sw6/vendor/autoload_runtime.php') (public/index.php:14) |