Error 406 Not Acceptable

GET https://sulu.paco-dev.io/.env

Forwarded to ErrorController (b3d74f)

Exceptions

Page does not exist in "env" format.

Exception

Symfony\Component\HttpKernel\Exception\ NotAcceptableHttpException

Show exception properties
Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException {#2251
  -statusCode: 406
  -headers: []
}
  1. bool $partial,
  2. ): string {
  3. $viewTemplate = $view . '.' . $requestFormat . '.twig';
  4. if (!$this->container->get('twig')->getLoader()->exists($viewTemplate)) {
  5. throw new NotAcceptableHttpException(\sprintf('Page does not exist in "%s" format.', $requestFormat));
  6. }
  7. if ($partial) {
  8. return $this->renderBlockView($viewTemplate, 'content', $parameters);
  9. } elseif ($preview) {
  1. if ('json' === $requestFormat) {
  2. $parameters = []; // TODO normalize for JSON response here or inside the resolver already, no headless support yet
  3. $response = new JsonResponse($parameters);
  4. } else {
  5. $response = new Response($this->renderSuluView($view, $requestFormat, $parameters, $preview, $partial));
  6. }
  7. $this->enhanceSuluCacheLifeTime($response);
  8. return $response;
in vendor/symfony/http-kernel/HttpKernel.php -> indexAction (line 183)
  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. if (!$this->handlingHttpCache) {
  2. $this->resetServices = true;
  3. }
  4. try {
  5. return $this->getHttpKernel()->handle($request, $type, $catch);
  6. } finally {
  7. --$this->requestStackSize;
  8. }
  9. }
Kernel->handle() in public/index.php (line 69)
  1. // When using the HttpCache, you need to call the method in your front controller
  2. // instead of relying on the configuration parameter
  3. // https://symfony.com/doc/6.4/reference/configuration/framework.html#http-method-override
  4. Request::enableHttpMethodParameterOverride();
  5. $request = Request::createFromGlobals();
  6. $response = $kernel->handle($request);
  7. $response->send();
  8. $kernel->terminate($request, $response);

Logs

Level Channel Message
INFO 13:46:55 deprecation User Deprecated: Since symfony/http-foundation 7.4: Request::get() is deprecated, use properties ->attributes, query or request directly instead.
{
    "exception": {}
}
INFO 13:46:55 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "0d9c70"
    },
    "request_uri": "https://sulu.paco-dev.io/_profiler/0d9c70?panel=exception&type=request",
    "method": "GET"
}
INFO 13:46:55 deprecation User Deprecated: Using ArrayAccess on Doctrine\ORM\Mapping\FieldMapping is deprecated and will not be possible in Doctrine ORM 4.0. Use the corresponding property instead. (ArrayAccessImplementation.php:18 called by ReferencesOption.php:72, https://github.com/doctrine/orm/pull/11211, package doctrine/orm)
{
    "exception": {}
}
INFO 13:46:55 deprecation User Deprecated: Specifying the "nullable" attribute for join columns in many-to-many associations (here, Sulu\Bundle\ContactBundle\Entity\Contact::$medias) is a no-op. The ORM will always set it to false. Doing so is deprecated and will be an error in 4.0. (ManyToManyOwningSideMapping.php:133 called by ClassMetadata.php:1448, https://github.com/doctrine/orm/pull/12126, package doctrine/orm)
{
    "exception": {}
}
INFO 13:46:55 deprecation User Deprecated: Since symfony/http-foundation 7.4: Request::get() is deprecated, use properties ->attributes, query or request directly instead.
{
    "exception": {}
}
INFO 13:46:55 deprecation User Deprecated: Since symfony/http-foundation 7.4: Request::get() is deprecated, use properties ->attributes, query or request directly instead.
{
    "exception": {}
}
INFO 13:46:55 deprecation User Deprecated: Since symfony/http-foundation 7.4: Request::get() is deprecated, use properties ->attributes, query or request directly instead.
{
    "exception": {}
}
INFO 13:46:55 deprecation User Deprecated: Since symfony/http-foundation 7.4: Request::get() is deprecated, use properties ->attributes, query or request directly instead.
{
    "exception": {}
}

Stack Trace

NotAcceptableHttpException
Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException:
Page does not exist in "env" format.

  at vendor/sulu/sulu/packages/content/src/UserInterface/Controller/Website/ContentController.php:119
  at Sulu\Content\UserInterface\Controller\Website\ContentController->renderSuluView()
     (vendor/sulu/sulu/packages/content/src/UserInterface/Controller/Website/ContentController.php:78)
  at Sulu\Content\UserInterface\Controller\Website\ContentController->indexAction()
     (vendor/symfony/http-kernel/HttpKernel.php:183)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (vendor/symfony/http-kernel/HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (vendor/symfony/http-kernel/Kernel.php:193)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:69)