Error 406 Not Acceptable

GET https://dod.oj-consulting.fr/.env

Exceptions

Page does not exist in "env" format.

Exception

Symfony\Component\HttpKernel\Exception\ NotAcceptableHttpException

Show exception properties
Symfony\Component\HttpKernel\Exception\NotAcceptableHttpException {#4061
  -statusCode: 406
  -headers: []
}
  1. }
  2. $viewTemplate = $structure->getView() . '.' . $requestFormat . '.twig';
  3. if (!$this->container->get('twig')->getLoader()->exists($viewTemplate)) {
  4. throw new NotAcceptableHttpException(\sprintf('Page does not exist in "%s" format.', $requestFormat));
  5. }
  6. // get attributes to render template
  7. $data = $this->getAttributes($attributes, $structure, $preview);
WebsiteController->renderStructure() in src/Controller/Website/DefaultController.php (line 21)
  1. {
  2. }
  3. public function index(Request $request, StructureInterface $structure, $preview = false, $partial = false): Response
  4. {
  5. return $this->renderStructure(
  6. structure: $structure,
  7. attributes: $this->dataBlock->load(structure: $structure, request: $request),
  8. preview: $preview,
  9. partial: $partial
  10. );
  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->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. }
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 17:28:14 deprecation User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Localization\Localization::setXDefault" method is deprecated on "Sulu\Component\Localization\Localization" use "setDefault" instead.
{
    "exception": {}
}
INFO 17:28:14 deprecation User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Localization\Localization::setXDefault" method is deprecated on "Sulu\Component\Localization\Localization" use "setDefault" instead.
{
    "exception": {}
}
INFO 17:28:14 deprecation User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Webspace\Portal::getXDefaultLocalization" method is deprecated on "Sulu\Component\Webspace\Portal" use "getDefaultLocalization" instead.
{
    "exception": {}
}
INFO 17:28:14 deprecation User Deprecated: Since sulu/sulu 2.3: The "Sulu\Component\Webspace\Portal::setXDefaultLocalization" method is deprecated on "Sulu\Component\Webspace\Portal" use "setDefaultLocalization" instead.
{
    "exception": {}
}
INFO 17:28:14 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "45b09b"
    },
    "request_uri": "https://dod.oj-consulting.fr/_profiler/45b09b",
    "method": "GET"
}

Stack Trace

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

  at vendor/sulu/sulu/src/Sulu/Bundle/WebsiteBundle/Controller/WebsiteController.php:58
  at Sulu\Bundle\WebsiteBundle\Controller\WebsiteController->renderStructure()
     (src/Controller/Website/DefaultController.php:21)
  at App\Controller\Website\DefaultController->index()
     (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:182)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (public/index.php:69)