Symfony Exception

MissingRequestParameterException

HTTP 400 Bad Request

Parameter "id" is missing.

Exception

Shopware\Core\Framework\Routing\Exception\ MissingRequestParameterException

Show exception properties
Shopware\Core\Framework\Routing\Exception\MissingRequestParameterException {#4343
  -statusCode: 400
  -headers: []
  #parameters: array:1 [
    "parameterName" => "id"
  ]
  #statusCode: 400
  #errorCode: "FRAMEWORK__MISSING_REQUEST_PARAMETER"
  -name: "id"
  -path: ""
}
  1.     }
  2.     public static function missingRequestParameter(string $namestring $path ''): self
  3.     {
  4.         if (!Feature::isActive('v6.6.0.0')) {
  5.             return new MissingRequestParameterException($name$path);
  6.         }
  7.         return new self(
  8.             Response::HTTP_BAD_REQUEST,
  9.             self::MISSING_REQUEST_PARAMETER_CODE,
in vendor/shopware/storefront/Controller/CmsController.php :: missingRequestParameter (line 50)
  1.     #[Route(path'/widgets/cms/{id}'name'frontend.cms.page'defaults: ['id' => null'XmlHttpRequest' => true'_httpCache' => true], methods: ['GET''POST'])]
  2.     public function page(?string $idRequest $requestSalesChannelContext $salesChannelContext): Response
  3.     {
  4.         if (!$id) {
  5.             throw RoutingException::missingRequestParameter('id');
  6.         }
  7.         $page $this->cmsRoute->load($id$request$salesChannelContext)->getCmsPage();
  8.         $this->hook(new CmsPageLoadedHook($page$salesChannelContext));
  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.     {
  2.         $request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
  3.         $this->requestStack->push($request);
  4.         try {
  5.             return $this->handleRaw($request$type);
  6.         } catch (\Throwable $e) {
  7.             if ($e instanceof \Error && !$this->handleAllThrowables) {
  8.                 throw $e;
  9.             }
  1.         $this->boot();
  2.         ++$this->requestStackSize;
  3.         $this->resetServices true;
  4.         try {
  5.             return $this->getHttpKernel()->handle($request$type$catch);
  6.         } finally {
  7.             --$this->requestStackSize;
  8.         }
  9.     }
  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 $requestbool $catch falseResponse $entry null)
  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$requestHttpKernelInterface::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.             && $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 65)
  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

MissingRequestParameterException
Shopware\Core\Framework\Routing\Exception\MissingRequestParameterException:
Parameter "id" is missing.

  at vendor/shopware/core/Framework/Routing/RoutingException.php:36
  at Shopware\Core\Framework\Routing\RoutingException::missingRequestParameter('id')
     (vendor/shopware/storefront/Controller/CmsController.php:50)
  at Shopware\Storefront\Controller\CmsController->page(null, object(Request), object(SalesChannelContext))
     (vendor/symfony/http-kernel/HttpKernel.php:166)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:74)
  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))
     (public/index.php:85)