Error 500 Internal Server Error

GET https://shop-stage.event-cloud.com/navigation/c98c182928af4493bea0a930d4ad2b88

Forwarded to ErrorController (c97a17)

Exceptions

Call to a member function getExtension() on null

Error

  1. }
  2. private function addTimeframesToVariant(SalesChannelProductEntity $product, ProductCollection $productCollection): void
  3. {
  4. if (!$product->getExtension('salesTimeframes') && $product->getParentId()) {
  5. $parentExtension = $productCollection->get($product->getParentId())->getExtension('salesTimeframes');
  6. if ($parentExtension) {
  7. $product->addExtension('salesTimeframes', $parentExtension);
  8. }
  9. }
  10. }
CorussoftProductProvider->addTimeframesToVariant() in custom/plugins/CorussoftBasePlugin/src/Core/Provider/CorussoftProductProvider.php (line 68)
  1. $this->getCurrentCartLineItemIds($salesChannelContext);
  2. $productIds = $this->getProductIds($products);
  3. $productCollection = $this->getProducts($productIds, $salesChannelContext);
  4. foreach ($products as $product) {
  5. $this->addTimeframesToVariant($product, $productCollection);
  6. $this->addCustomerLimitToVariant($product, $productCollection);
  7. $this->addBundleExtensions($product, $productCollection, $salesChannelId, $salesChannelContext);
  8. $this->addPreconditions($product, $productCollection);
  9. $this->checkRemainingPreconditions($product, $salesChannelContext, $productCollection);
  10. $this->addProductLevels($product, $productCollection);
  1. $result = $productListingRouteResponse->getResult();
  2. $products = $result->getElements();
  3. $this->corussoftProductProvider->enrichProducts($products, $context);
  4. return new ProductListingRouteResponse($result);
  5. }
  6. }
  1. }
  2. $value = $this->cache->get($key, function (ItemInterface $item) use ($categoryId, $request, $context, $criteria) {
  3. $name = self::buildName($categoryId);
  4. $response = $this->tracer->trace($name, fn () => $this->getDecorated()->load($categoryId, $request, $context, $criteria));
  5. $item->tag($this->generateTags($categoryId, $request, $response, $context, $criteria));
  6. return CacheValueCompressor::compress($response);
  7. });
in vendor/shopware/core/System/SystemConfig/SystemConfigService.php -> Shopware\Core\Content\Product\SalesChannel\Listing\{closure} (line 451)
  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 101)
  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 97)
  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. }
  2. $value = $this->cache->get($key, function (ItemInterface $item) use ($categoryId, $request, $context, $criteria) {
  3. $name = self::buildName($categoryId);
  4. $response = $this->tracer->trace($name, fn () => $this->getDecorated()->load($categoryId, $request, $context, $criteria));
  5. $item->tag($this->generateTags($categoryId, $request, $response, $context, $criteria));
  6. return CacheValueCompressor::compress($response);
  7. });
in vendor/symfony/cache-contracts/CacheTrait.php -> Shopware\Core\Content\Product\SalesChannel\Listing\{closure} (line 64)
  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. trait CacheTrait
  3. {
  4. public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed
  5. {
  6. return $this->doGet($this, $key, $callback, $beta, $metadata);
  7. }
  8. public function delete(string $key): bool
  9. {
  10. return $this->deleteItem($key);
  1. if ($key === null) {
  2. return $this->getDecorated()->load($categoryId, $request, $context, $criteria);
  3. }
  4. $value = $this->cache->get($key, function (ItemInterface $item) use ($categoryId, $request, $context, $criteria) {
  5. $name = self::buildName($categoryId);
  6. $response = $this->tracer->trace($name, fn () => $this->getDecorated()->load($categoryId, $request, $context, $criteria));
  7. $item->tag($this->generateTags($categoryId, $request, $response, $context, $criteria));
  1. $this->eventDispatcher->dispatch(
  2. new ProductListingCriteriaEvent($request, $criteria, $context)
  3. );
  4. $response = $this->getDecorated()->load($categoryId, $request, $context, $criteria);
  5. $response->getResult()->addCurrentFilter('navigationId', $categoryId);
  6. $this->processor->process($request, $response->getResult(), $context);
  1. $criteria = new Criteria();
  2. $criteria->setTitle('cms::product-listing');
  3. $listing = $this->listingRoute
  4. ->load($navigationId, $request, $context, $criteria)
  5. ->getResult();
  6. $data->setListing($listing);
  7. }
  1. $result = new ElementDataCollection();
  2. $this->mapSearchResults($result, $slot, $criteriaList, $criteriaResult);
  3. $this->mapEntities($result, $slot, $criteriaList, $identifierResult);
  4. $resolver->enrich($slot, $resolverContext, $result);
  5. // replace with return value from enrich(), because it's allowed to change the entity type
  6. $slots->set($slotId, $slot);
  7. }
  1. public function publish(string $name, Extension $extension, callable $function): mixed
  2. {
  3. $this->dispatcher->dispatch($extension, self::pre($name));
  4. if (!$extension->isPropagationStopped()) {
  5. $extension->result = $function(...$extension->getParams());
  6. }
  7. $extension->resetPropagation();
  8. $this->dispatcher->dispatch($extension, self::post($name));
  1. // fetch data from storage
  2. $identifierResult = $this->fetchByIdentifier($directReads, $resolverContext->getSalesChannelContext());
  3. $criteriaResult = $this->fetchByCriteria($searches, $resolverContext->getSalesChannelContext());
  4. return $this->extensions->publish(
  5. name: CmsSlotsDataEnrichExtension::NAME,
  6. extension: new CmsSlotsDataEnrichExtension(
  7. slots: $slots,
  8. criteriaList: $criteriaList,
  9. identifierResult: $identifierResult,
  1. public function publish(string $name, Extension $extension, callable $function): mixed
  2. {
  3. $this->dispatcher->dispatch($extension, self::pre($name));
  4. if (!$extension->isPropagationStopped()) {
  5. $extension->result = $function(...$extension->getParams());
  6. }
  7. $extension->resetPropagation();
  8. $this->dispatcher->dispatch($extension, self::post($name));
  1. );
  2. }
  3. public function resolve(CmsSlotCollection $slots, ResolverContext $resolverContext): CmsSlotCollection
  4. {
  5. return $this->extensions->publish(
  6. name: CmsSlotsDataResolveExtension::NAME,
  7. extension: new CmsSlotsDataResolveExtension($slots, $resolverContext),
  8. function: $this->__resolve(...),
  9. );
  10. }
  1. }
  2. private function loadSlotData(CmsSectionCollection $sections, ResolverContext $resolverContext): void
  3. {
  4. $blocks = $sections->getBlocks();
  5. $slots = $this->slotDataResolver->resolve($blocks->getSlots(), $resolverContext);
  6. $blocks->setSlots($slots);
  7. }
  8. /**
  1. // step 4, overwrite slot config
  2. $this->overwriteSlotConfig($sections, $overwrite);
  3. // step 5, resolve slot data
  4. $this->loadSlotData($sections, $resolverContext);
  5. }
  6. $this->dispatcher->dispatch(new CmsPageLoadedEvent($request, $pages, $context));
  7. $this->dispatcher->dispatch(new AddCacheTagEvent(...$this->extractProductIds($pages)));
  1. return new CategoryRouteResponse($category);
  2. }
  3. $resolverContext = new EntityResolverContext($context, $request, $this->categoryDefinition, $category);
  4. $pages = $this->cmsPageLoader->load(
  5. $request,
  6. $this->createCriteria($pageId, $request),
  7. $context,
  8. $slotConfig,
  9. $resolverContext
  1. }
  2. $value = $this->cache->get($key, function (ItemInterface $item) use ($navigationId, $request, $context) {
  3. $name = self::buildName($navigationId);
  4. $response = $this->tracer->trace($name, fn () => $this->getDecorated()->load($navigationId, $request, $context));
  5. $item->tag($this->generateTags($navigationId, $response, $request, $context));
  6. return CacheValueCompressor::compress($response);
  7. });
in vendor/shopware/core/System/SystemConfig/SystemConfigService.php -> Shopware\Core\Content\Category\SalesChannel\{closure} (line 451)
  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 101)
  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 97)
  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. }
  2. $value = $this->cache->get($key, function (ItemInterface $item) use ($navigationId, $request, $context) {
  3. $name = self::buildName($navigationId);
  4. $response = $this->tracer->trace($name, fn () => $this->getDecorated()->load($navigationId, $request, $context));
  5. $item->tag($this->generateTags($navigationId, $response, $request, $context));
  6. return CacheValueCompressor::compress($response);
  7. });
in vendor/symfony/cache-contracts/CacheTrait.php -> Shopware\Core\Content\Category\SalesChannel\{closure} (line 64)
  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. trait CacheTrait
  3. {
  4. public function get(string $key, callable $callback, ?float $beta = null, ?array &$metadata = null): mixed
  5. {
  6. return $this->doGet($this, $key, $callback, $beta, $metadata);
  7. }
  8. public function delete(string $key): bool
  9. {
  10. return $this->deleteItem($key);
  1. if ($key === null) {
  2. return $this->getDecorated()->load($navigationId, $request, $context);
  3. }
  4. $value = $this->cache->get($key, function (ItemInterface $item) use ($navigationId, $request, $context) {
  5. $name = self::buildName($navigationId);
  6. $response = $this->tracer->trace($name, fn () => $this->getDecorated()->load($navigationId, $request, $context));
  7. $item->tag($this->generateTags($navigationId, $response, $request, $context));
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. if (Feature::isActive('cache_rework')) {
  3. return $this->getDecorated()->load($navigationId, $request, $context);
  4. }
  5. return Profiler::trace('category-route', function () use ($navigationId, $request, $context) {
  6. if ($context->hasState(...$this->states)) {
  7. return $this->getDecorated()->load($navigationId, $request, $context);
  8. }
  9. $key = $this->generateKey($navigationId, $request, $context);
  1. $page = NavigationPage::createFrom($page);
  2. $navigationId = $request->get('navigationId', $context->getSalesChannel()->getNavigationCategoryId());
  3. $category = $this->cmsPageRoute
  4. ->load($navigationId, $request, $context)
  5. ->getCategory();
  6. if (!$category->getActive()) {
  7. throw CategoryException::categoryNotFound($category->getId());
  8. }
  1. }
  2. #[Route(path: '/navigation/{navigationId}', name: 'frontend.navigation.page', options: ['seo' => true], defaults: ['_httpCache' => true], methods: ['GET'])]
  3. public function index(SalesChannelContext $context, Request $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($event, KernelEvents::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($event, KernelEvents::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. $this->dispatcher->dispatch($event);
  2. return $event->getResponse();
  3. }
  4. return parent::handle($request, $type, $catch);
  5. }
  6. }
  1. if (!IpUtils::checkIp('127.0.0.1', $trustedProxies)) {
  2. Request::setTrustedProxies(array_merge($trustedProxies, ['127.0.0.1']), Request::getTrustedHeaderSet());
  3. }
  4. try {
  5. return $kernel->handle($request, $type, $catch);
  6. } finally {
  7. // restore global state
  8. Request::setTrustedProxies($trustedProxies, $trustedHeaderSet);
  9. }
  10. }
  1. protected function forward(Request $request, bool $catch = false, ?Response $entry = null): Response
  2. {
  3. $this->surrogate?->addSurrogateCapability($request);
  4. // always a "master" request (as the real master request can be in cache)
  5. $response = SubRequestHandler::handle($this->kernel, $request, HttpKernelInterface::MAIN_REQUEST, $catch);
  6. /*
  7. * Support stale-if-error given on Responses or as a config option.
  8. * RFC 7234 summarizes in Section 4.2.4 (but also mentions with the individual
  9. * Cache-Control directives) that
  1. // avoid that the backend sends no content
  2. $subRequest->headers->remove('If-Modified-Since');
  3. $subRequest->headers->remove('If-None-Match');
  4. $response = $this->forward($subRequest, $catch);
  5. if ($response->isCacheable()) {
  6. $this->store($request, $response);
  7. }
  1. }
  2. if (null === $entry) {
  3. $this->record($request, 'miss');
  4. return $this->fetch($request, $catch);
  5. }
  6. if (!$this->isFreshEnough($request, $entry)) {
  7. $this->record($request, 'stale');
  1. reload the cache by fetching a fresh response and caching it (if possible).
  2. */
  3. $this->record($request, 'reload');
  4. $response = $this->fetch($request, $catch);
  5. } else {
  6. $response = $this->lookup($request, $catch);
  7. }
  8. $this->restoreResponseBody($request, $response);
  9. if (HttpKernelInterface::MAIN_REQUEST === $type) {
  1. // only handle main request inside http cache, because ESI tags are also interpreted as main request.
  2. // sub requests are requests, which are forwarded to the kernel inside the php stack
  3. // https://github.com/symfony/symfony/issues/51648#issuecomment-1717846894
  4. if ($type === HttpKernelInterface::MAIN_REQUEST) {
  5. $response = parent::handle($request, $type, $catch);
  6. } elseif ($request->attributes->has('_sw_esi')) {
  7. $response = parent::handle($request, $type, $catch);
  8. } else {
  9. $response = $this->getKernel()->handle($request, $type, $catch);
  10. }
in vendor/shopware/core/Kernel.php -> handle (line 156)
  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. ) {
  2. }
  3. public function run(): int
  4. {
  5. $response = $this->kernel->handle($this->request);
  6. if (Kernel::VERSION_ID >= 60400) {
  7. $response->send(false);
  8. if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in vendor/autoload_runtime.php -> run (line 29)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/var/www/shop-stage.event-cloud.com/vendor/autoload_runtime.php') in public/index.php (line 10)
  1. use Shopware\Core\Installer\InstallerKernel;
  2. use Shopware\Core\Framework\Adapter\Kernel\KernelFactory;
  3. $_SERVER['SCRIPT_FILENAME'] = __FILE__;
  4. require_once __DIR__ . '/../vendor/autoload_runtime.php';
  5. if (!file_exists(__DIR__ . '/../.env') && !file_exists(__DIR__ . '/../.env.dist') && !file_exists(__DIR__ . '/../.env.local.php')) {
  6. $_SERVER['APP_RUNTIME_OPTIONS']['disable_dotenv'] = true;
  7. }