Error 500 Internal Server Error

GET https://branche1-73o290m6x5bq.ogoxe.com/login

Forwarded to ErrorController (fbc9f6)

Exceptions

Variable "locale" does not exist in base_welcome.html.twig at line 13.

Exception

Twig\Error\ RuntimeError

Show exception properties
Twig\Error\RuntimeError {#1447
  -lineno: 13
  -rawMessage: "Variable "locale" does not exist."
  -source: Twig\Source {#1410
    -code: """
      <!DOCTYPE html>\n
      <html class="base-welcome">\n
      \n
      <head>\n
          <title>{{'title.ogoxeApllication'|trans}} - {% block title 'title.welcome' %}</title>\n
      \n
          {% include "_partials/layout/head.html.twig" %}\n
          {% block stylesheets %}\n
              {{ encore_entry_link_tags('theme_welcome') }}\n
          {% endblock %}\n
      </head>\n
      \n
      <body class="{% block body_class %}{% endblock %}" data-locale="{{ locale }}">\n
          {% block body %}\n
              <div id="main-content">\n
                  <div id="content-container">\n
                      <div>\n
                          <div class="card">\n
                              {% block content %}{% endblock %}\n
                          </div>\n
                          <p id="js-policy" class="policy"><a href="{{ path('confidentiality') }}" target="_blank">&copy; {{'auth.copyrights'|trans}}</a></p>\n
                      </div>\n
                  </div>\n
                  <div id="bg-container">\n
                      <div id="title">\n
                          <span class="company">{{'title.ogoxeApp'|trans}}</span>&nbsp;\n
                          <span class="company-description">{{'title.iotService'|trans}}</span>\n
                      </div>\n
                      {% block bg_content %}\n
                      <div class="citation">\n
                          {{'title.completTool'|trans}} <br>\n
                          {{'title.riskManagement'|trans}} <br>\n
                          <span class="climat">{{'title.climat'|trans}}</span>\n
                      </div>\n
                      <img id="welcome-image" src="{{ asset('build/welcome/image_sign_up.png') }}" alt="">\n
                      {% endblock %}\n
                  </div>\n
              </div>\n
          {% endblock %}\n
      \n
          {% block javascripts %}\n
              {{ encore_entry_script_tags('theme_welcome') }}\n
          {% endblock %}\n
      \n
          {% include "_partials/layout/analytics.html.twig" %}\n
      </body>\n
      \n
      </html>\n
      """
    -name: "base_welcome.html.twig"
    -path: "/var/www/branche1-73o290m6x5bq.ogoxe.com/templates/base_welcome.html.twig"
  }
  -phpFile: "/var/www/branche1-73o290m6x5bq.ogoxe.com/var/cache/dev/twig/e6/e67ce659d6b64df3d35db52c97013802.php"
  -phpLine: 79
}
  1. {% block stylesheets %}
  2. {{ encore_entry_link_tags('theme_welcome') }}
  3. {% endblock %}
  4. </head>
  5. <body class="{% block body_class %}{% endblock %}" data-locale="{{ locale }}">
  6. {% block body %}
  7. <div id="main-content">
  8. <div id="content-container">
  9. <div>
  10. <div class="card">
  1. <body class=\"";
  2. // line 13
  3. yield from $this->unwrap()->yieldBlock('body_class', $context, $blocks);
  4. yield "\" data-locale=\"";
  5. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape((isset($context["locale"]) || array_key_exists("locale", $context) ? $context["locale"] : (function () { throw new RuntimeError('Variable "locale" does not exist.', 13, $this->source); })()), "html", null, true);
  6. yield "\">
  7. ";
  8. // line 14
  9. yield from $this->unwrap()->yieldBlock('body', $context, $blocks);
  10. // line 40
in vendor/twig/twig/src/Template.php -> doDisplay (line 402)
  1. {
  2. $context += $this->env->getGlobals();
  3. $blocks = array_merge($this->blocks, $blocks);
  4. try {
  5. yield from $this->doDisplay($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($this->getSourceContext());
  9. }
  1. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "security/login.html.twig"));
  3. $this->parent = $this->load("base_welcome.html.twig", 1);
  4. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  5. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  6. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in vendor/twig/twig/src/Template.php -> doDisplay (line 402)
  1. {
  2. $context += $this->env->getGlobals();
  3. $blocks = array_merge($this->blocks, $blocks);
  4. try {
  5. yield from $this->doDisplay($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($this->getSourceContext());
  9. }
  1. return $this->blocks;
  2. }
  3. public function display(array $context, array $blocks = []): void
  4. {
  5. foreach ($this->yield($context, $blocks) as $data) {
  6. echo $data;
  7. }
  8. }
  9. public function render(array $context): string
in vendor/twig/twig/src/Template.php -> display (line 373)
  1. ob_start();
  2. } else {
  3. ob_start(function () { return ''; });
  4. }
  5. try {
  6. $this->display($context);
  7. } catch (\Throwable $e) {
  8. while (ob_get_level() > $level) {
  9. ob_end_clean();
  10. }
  1. yield from $this->template->yieldBlock($name, $context);
  2. }
  3. public function render(array $context = []): string
  4. {
  5. return $this->template->render($context);
  6. }
  7. /**
  8. * @return void
  9. */
  1. * @throws SyntaxError When an error occurred during compilation
  2. * @throws RuntimeError When an error occurred during rendering
  3. */
  4. public function render($name, array $context = []): string
  5. {
  6. return $this->load($name)->render($context);
  7. }
  8. /**
  9. * Displays a template.
  10. *
  1. if (null !== $block) {
  2. return $this->container->get('twig')->load($view)->renderBlock($block, $parameters);
  3. }
  4. return $this->container->get('twig')->render($view, $parameters);
  5. }
  6. private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response
  7. {
  8. $content = $this->doRenderView($view, $block, $parameters, $method);
  1. return $this->container->get('twig')->render($view, $parameters);
  2. }
  3. private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response
  4. {
  5. $content = $this->doRenderView($view, $block, $parameters, $method);
  6. $response ??= new Response();
  7. if (200 === $response->getStatusCode()) {
  8. foreach ($parameters as $v) {
  9. if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
  1. * If an invalid form is found in the list of parameters, a 422 status code is returned.
  2. * Forms found in parameters are auto-cast to form views.
  3. */
  4. protected function render(string $view, array $parameters = [], ?Response $response = null): Response
  5. {
  6. return $this->doRender($view, null, $parameters, $response, __FUNCTION__);
  7. }
  8. /**
  9. * Renders a block in a view.
  10. *
AbstractController->render() in src/Controller/LoginController.php (line 24)
  1. #[Route(path: '/login', name: 'login', methods: ['GET', 'POST'])]
  2. public function formLogin(): Response
  3. {
  4. $error = $this->utils->getLastAuthenticationError();
  5. return $this->render('security/login.html.twig', [
  6. 'last_username' => $this->utils->getLastUsername(),
  7. 'error' => $error,
  8. ]);
  9. }
  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. 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. }
  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 32)
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('/var/www/branche1-73o290m6x5bq.ogoxe.com/vendor/autoload_runtime.php') in public/index.php (line 5)
  1. <?php
  2. use App\Kernel;
  3. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  4. return fn (array $context): \App\Kernel => new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);

Logs

Level Channel Message
INFO 06:32:36 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "a97428"
    },
    "request_uri": "https://branche1-73o290m6x5bq.ogoxe.com/_profiler/a97428?panel=exception&type=request",
    "method": "GET"
}
INFO 06:32:36 deprecation User Deprecated: Relying on non-optimal defaults for ID generation is deprecated, and IDENTITY results in SERIAL, which is not recommended. Instead, configure identifier generation strategies explicitly through configuration. We currently recommend "SEQUENCE" for "Doctrine\DBAL\Platforms\PostgreSQLPlatform", when using DBAL 3, and "IDENTITY" when using DBAL 4, so you should probably use the following configuration before upgrading to DBAL 4, and remove it after deploying that upgrade: $configuration->setIdentityGenerationPreferences([ "Doctrine\DBAL\Platforms\PostgreSQLPlatform" => ClassMetadata::GENERATOR_TYPE_SEQUENCE, ]); (ClassMetadataFactory.php:639 called by ClassMetadataFactory.php:550, https://github.com/doctrine/orm/issues/8893, package doctrine/orm)
{
    "exception": {}
}
INFO 06:32:36 doctrine Connecting with parameters {params}
{
    "params": {
        "driver": "pdo_pgsql",
        "idle_connection_ttl": 600,
        "host": "127.0.0.1",
        "port": 5432,
        "user": "ogoxe_test_user",
        "password": "<redacted>",
        "driverOptions": [],
        "defaultTableOptions": [],
        "dbname": "ogoxe_app_branche1",
        "serverVersion": "13",
        "charset": "utf8"
    }
}
DEBUG 06:32:36 doctrine Executing query: SELECT t0.id AS id_1, t0.role AS role_2, t0.user_id AS user_id_3, t0.station_id AS station_id_4 FROM user_station_role t0 WHERE t0.user_id IS NULL
{
    "sql": "SELECT t0.id AS id_1, t0.role AS role_2, t0.user_id AS user_id_3, t0.station_id AS station_id_4 FROM user_station_role t0 WHERE t0.user_id IS NULL"
}
DEBUG 06:32:36 doctrine Executing query: SELECT t0.id AS id_1, t0.role AS role_2, t0.user_id AS user_id_3, t0.station_id AS station_id_4 FROM user_station_role t0 WHERE t0.user_id IS NULL
{
    "sql": "SELECT t0.id AS id_1, t0.role AS role_2, t0.user_id AS user_id_3, t0.station_id AS station_id_4 FROM user_station_role t0 WHERE t0.user_id IS NULL"
}
DEBUG 06:32:36 doctrine Executing query: SELECT t0.id AS id_1, t0.role AS role_2, t0.user_id AS user_id_3, t0.station_id AS station_id_4 FROM user_station_role t0 WHERE t0.user_id IS NULL
{
    "sql": "SELECT t0.id AS id_1, t0.role AS role_2, t0.user_id AS user_id_3, t0.station_id AS station_id_4 FROM user_station_role t0 WHERE t0.user_id IS NULL"
}

Stack Trace

RuntimeError
Twig\Error\RuntimeError:
Variable "locale" does not exist in "base_welcome.html.twig" at line 13.

  at templates/base_welcome.html.twig:13
  at __TwigTemplate_21e8b924d0c8e3c4fb1387f78c893d9a->{closure}()
     (var/cache/dev/twig/e6/e67ce659d6b64df3d35db52c97013802.php:79)
  at __TwigTemplate_21e8b924d0c8e3c4fb1387f78c893d9a->doDisplay()
     (vendor/twig/twig/src/Template.php:402)
  at Twig\Template->yield()
     (var/cache/dev/twig/f8/f8657a8ff5087402ec1da3022f571e8e.php:55)
  at __TwigTemplate_bd76ddaa11e853ac32d0730145ec93c3->doDisplay()
     (vendor/twig/twig/src/Template.php:402)
  at Twig\Template->yield()
     (vendor/twig/twig/src/Template.php:358)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:373)
  at Twig\Template->render()
     (vendor/twig/twig/src/TemplateWrapper.php:51)
  at Twig\TemplateWrapper->render()
     (vendor/twig/twig/src/Environment.php:333)
  at Twig\Environment->render()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:467)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRenderView()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:472)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRender()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:284)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render()
     (src/Controller/LoginController.php:24)
  at App\Controller\LoginController->formLogin()
     (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()
     (vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (vendor/autoload_runtime.php:32)
  at require_once('/var/www/branche1-73o290m6x5bq.ogoxe.com/vendor/autoload_runtime.php')
     (public/index.php:5)