Error 500 Internal Server Error

GET https://violons-d-ingres.higumadev.fr/actualites/nouveau-professeur-violon

Exceptions

Impossible to access an attribute ("title") on a null variable in front/actualites/show.html.twig at line 72.

Exception

Twig\Error\ RuntimeError

Show exception properties
Twig\Error\RuntimeError {#488
  -lineno: 72
  -rawMessage: "Impossible to access an attribute ("title") on a null variable."
  -source: Twig\Source {#461
    -code: """
      {% extends 'front/base.html.twig' %}\n
      \n
      {% set articles = [\n
          {\n
              slug: 'concert-fin-annee-2025',\n
              tag: 'Événement',\n
              tag_color: 'accent',\n
              title: 'Concert de fin d\'année — les inscriptions sont ouvertes',\n
              image: 'https://images.unsplash.com/photo-1779113632457-7d798e5c8778?q=80&w=1170&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',\n
              date: '15 mai 2025',\n
              content: '\n
                  <p>Chaque année, le concert de fin de saison est un moment fort pour l\'association.\n
                  Cette année encore, nous avons hâte de vous retrouver dans la grande salle des fêtes\n
                  pour une soirée placée sous le signe de la musique, de la magie et des arts.</p>\n
      \n
                  <h2>Programme de la soirée</h2>\n
                  <p>Le programme s\'annonce riche : les élèves en violon ouvriront la soirée avec un\n
                  ensemble de pièces classiques travaillées tout au long de l\'année.</p>\n
      \n
                  <blockquote>« Chaque élève qui monte sur scène vit un moment dont il se souviendra toute sa vie. »</blockquote>\n
      \n
                  <p>La magie clôturera la soirée avec un spectacle inédit préparé par nos élèves\n
                  avancés, encadrés par Julien Marceau.</p>\n
      \n
                  <h2>Comment s\'inscrire ?</h2>\n
                  <p>Les inscriptions sont ouvertes jusqu\'au <strong>31 mai</strong>. Contactez-nous à\n
                  <a href="mailto:contact@violons-d-ingres.fr">contact@violons-d-ingres.fr</a>.</p>\n
      \n
                  <ul>\n
                      <li>Gratuit pour les élèves de l\'association</li>\n
                      <li>Entrée libre pour le public</li>\n
                      <li>Pot de l\'amitié offert après le spectacle</li>\n
                  </ul>\n
              '\n
          },\n
          {\n
              slug: 'cours-magie-adultes',\n
              tag: 'Nouveau',\n
              tag_color: 'magic',\n
              title: 'Ouverture d\'un cours de magie pour adultes',\n
              image: 'https://images.unsplash.com/photo-1691213426024-ab6eb6f33d64?q=80&w=1400&auto=format&fit=crop',\n
              date: '3 mars 2025',\n
              content: '<p>Suite au succès de nos ateliers jeunesse, nous ouvrons un nouveau créneau dédié aux adultes.</p>'\n
          },\n
          {\n
              slug: 'exposition-arts-plastiques',\n
              tag: 'Exposition',\n
              tag_color: 'paint',\n
              title: 'Exposition des travaux d\'arts plastiques',\n
              image: 'https://images.unsplash.com/photo-1708772002725-65e0b9bf6ba1?q=80&w=1400&auto=format&fit=crop',\n
              date: '18 février 2025',\n
              content: '<p>Les élèves exposent leurs créations à la médiathèque de Vaucresson du 15 au 30 mars.</p>'\n
          },\n
          {\n
              slug: 'forum-associations-vaucresson',\n
              image: 'https://images.unsplash.com/photo-1632383380286-80f79eb1bae1?q=80&w=880&auto=format&fit=crop&ixlib=rb-4.1.0&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D',\n
              tag: 'Événement',\n
              tag_color: 'accent',\n
              title: 'Forum des associations de Vaucresson',\n
              content: '<p>Retrouvez-nous au forum des associations le 6 septembre de 9h30 à 12h30 place du marché.<p>',\n
              date: '1 février 2025',\n
          },\n
      ] %}\n
      \n
      {% set currentArticle = null %}\n
      {% for a in articles %}\n
          {% if a.slug == slug %}\n
              {% set currentArticle = a %}\n
          {% endif %}\n
      {% endfor %}\n
      \n
      {% block title %}{{ currentArticle.title }} — Les Violons d'Ingres{% endblock %}\n
      \n
      {% block body %}\n
      \n
          {# ── BREADCRUMB ────────────────────────────────────────────────────── #}\n
          <nav class="flex items-center gap-2 pt-28 pb-4 px-16 text-[0.78rem] text-stone">\n
              <a href="{{ path('app_main') }}" class="text-taupe hover:text-dark transition-colors duration-200">\n
                  Accueil\n
              </a>\n
              <span>→</span>\n
              <a href="{{ path('app_news') }}" class="text-taupe hover:text-dark transition-colors duration-200">\n
                  Actualités\n
              </a>\n
              <span>→</span>\n
              <span class="text-dark truncate max-w-[40ch]">{{ currentArticle.title }}</span>\n
          </nav>\n
      \n
          {# ── HEADER ────────────────────────────────────────────────────────── #}\n
          <header class="px-16 pt-4 pb-16 bg-warm-white">\n
          <span class="news-card__tag news-card__tag--{{ currentArticle.tag_color }}">\n
              {{ currentArticle.tag }}\n
          </span>\n
              <h1 class="font-['Cormorant_Garamond'] text-[clamp(2rem,3.5vw,3.5rem)] font-light leading-[1.15] text-dark mt-4 mb-5 max-w-[22ch]">\n
                  {{ currentArticle.title }}\n
              </h1>\n
              <div class="flex items-center gap-6">\n
                  <time class="news-card__date">\n
                      <svg width="13" height="13" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">\n
                          <rect x="3" y="4" width="18" height="18" rx="2"/>\n
                          <line x1="16" y1="2" x2="16" y2="6"/>\n
                          <line x1="8" y1="2" x2="8" y2="6"/>\n
                          <line x1="3" y1="10" x2="21" y2="10"/>\n
                      </svg>\n
                      {{ currentArticle.date }}\n
                  </time>\n
                  <span class="text-[0.78rem] text-stone tracking-[0.08em]">\n
                  Les Violons d'Ingres\n
              </span>\n
              </div>\n
          </header>\n
      \n
          {# ── IMAGE COVER ───────────────────────────────────────────────────── #}\n
          <div class="h-120 overflow-hidden">\n
              <img\n
                      src="{{ currentArticle.image }}"\n
                      alt="{{ currentArticle.title }}"\n
                      class="w-full h-full object-cover block"\n
              >\n
          </div>\n
      \n
          {# ── LAYOUT CONTENU + SIDEBAR ──────────────────────────────────────── #}\n
          <div class="grid grid-cols-[1fr_340px] gap-20 px-16 py-20 max-w-350 mx-auto items-start">\n
      \n
              {# Prose #}\n
              <main class="\n
              max-w-[68ch]\n
              [&_h2]:font-['Cormorant_Garamond'] [&_h2]:text-[1.7rem] [&_h2]:font-light [&_h2]:mt-10 [&_h2]:mb-4 [&_h2]:text-dark\n
              [&_p]:text-[0.97rem] [&_p]:text-[#3d3530] [&_p]:leading-[1.9] [&_p]:mb-5\n
              [&_a]:text-accent [&_a]:underline\n
              [&_strong]:font-medium [&_strong]:text-dark\n
              [&_blockquote]:border-l-2 [&_blockquote]:border-accent [&_blockquote]:my-8 [&_blockquote]:py-4 [&_blockquote]:px-8 [&_blockquote]:bg-cream [&_blockquote]:font-['Cormorant_Garamond'] [&_blockquote]:italic [&_blockquote]:text-[1.15rem] [&_blockquote]:text-taupe\n
              [&_ul]:my-4 [&_ul]:mb-6 [&_ul]:ml-6 [&_ul]:list-disc\n
              [&_ol]:my-4 [&_ol]:mb-6 [&_ol]:ml-6 [&_ol]:list-decimal\n
              [&_li]:mb-2 [&_li]:text-[0.95rem] [&_li]:text-[#3d3530]\n
          ">\n
                  {{ currentArticle.content|raw }}\n
              </main>\n
      \n
              {# Sidebar #}\n
              <aside class="flex flex-col gap-6 sticky top-24">\n
      \n
                  {# À lire aussi #}\n
                  <div class="border border-sand p-8">\n
                      <h4 class="text-[0.72rem] tracking-[0.15em] uppercase text-stone mb-6 pb-4 border-b border-sand">\n
                          À lire aussi\n
                      </h4>\n
                      {% for a in articles %}\n
                          {% if a.slug != currentArticle.slug %}\n
                              <a href="{{ path('app_news_show', {slug: a.slug}) }}"\n
                                 class="flex gap-4 items-start py-4 border-b border-sand last:border-b-0 hover:opacity-70 transition-opacity duration-200 no-underline">\n
                                  <img\n
                                          src="{{ a.image }}"\n
                                          alt="{{ a.title }}"\n
                                          class="w-18 h-14 object-cover shrink-0"\n
                                  >\n
                                  <div class="flex flex-col gap-1">\n
                                      <p class="text-[0.82rem] text-dark leading-[1.4] mt-1">{{ a.title }}</p>\n
                                      <time class="news-card__date mt-1">{{ a.date }}</time>\n
                                  </div>\n
                              </a>\n
                          {% endif %}\n
                      {% endfor %}\n
                  </div>\n
      \n
                  {# Contact #}\n
                  <div class="border border-sand p-8 flex flex-col gap-4">\n
                      <h4 class="text-[0.72rem] tracking-[0.15em] uppercase text-stone pb-4 border-b border-sand">\n
                          Nous contacter\n
                      </h4>\n
                      <p class="text-[0.85rem] text-taupe leading-[1.7]">\n
                          Une question sur cet événement ?\n
                      </p>\n
                      <a href="mailto:contact@violons-d-ingres.fr"\n
                         class="inline-block bg-dark text-warm-white text-[0.75rem] tracking-widest uppercase px-5 py-3 hover:bg-accent transition-colors duration-300 text-center no-underline font-['DM_Sans']">\n
                          Écrire un email\n
                      </a>\n
                  </div>\n
      \n
              </aside>\n
          </div>\n
      \n
          {# ── RETOUR ────────────────────────────────────────────────────────── #}\n
          <div class="px-16 pb-24">\n
              <a href="{{ path('app_news') }}" class="btn-secondary">\n
                  ← Retour aux actualités\n
              </a>\n
          </div>\n
      \n
      {% endblock %}\n
      """
    -name: "front/actualites/show.html.twig"
    -path: "/var/www/violons-d-ingres.higumadev/html/templates/front/actualites/show.html.twig"
  }
  -phpFile: "/var/www/violons-d-ingres.higumadev/html/vendor/twig/twig/src/Extension/CoreExtension.php"
  -phpLine: 1752
}
  1. {% if a.slug == slug %}
  2. {% set currentArticle = a %}
  3. {% endif %}
  4. {% endfor %}
  5. {% block title %}{{ currentArticle.title }} — Les Violons d'Ingres{% endblock %}
  6. {% block body %}
  7. {# ── BREADCRUMB ────────────────────────────────────────────────────── #}
  8. <nav class="flex items-center gap-2 pt-28 pb-4 px-16 text-[0.78rem] text-stone">
  1. $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  2. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  3. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));
  4. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, (isset($context["currentArticle"]) || array_key_exists("currentArticle", $context) ? $context["currentArticle"] : (function () { throw new RuntimeError('Variable "currentArticle" does not exist.', 72, $this->source); })()), "title", [], "any", false, false, false, 72), "html", null, true);
  5. yield " — Les Violons d\x27Ingres";
  6. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in vendor/twig/twig/src/Template.php -> block_title (line 456)
  1. }
  2. if (null !== $template) {
  3. try {
  4. $template->ensureSecurityChecked();
  5. yield from $template->$block($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($template->getSourceContext());
  9. }
  1. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/piano.ico"), "html", null, true);
  2. yield "\" type=\"image/x-icon\">
  3. <title>";
  4. // line 15
  5. yield from $this->unwrap()->yieldBlock('title', $context, $blocks);
  6. yield " | Les Violons d\x27Ingres</title>
  7. </head>
  8. <body>
  9. ";
  10. // line 18
in vendor/twig/twig/src/Template.php -> doDisplay (line 411)
  1. $context += $this->env->getGlobals();
  2. $blocks = array_merge($this->blocks, $blocks);
  3. try {
  4. $this->ensureSecurityChecked();
  5. yield from $this->doDisplay($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($this->getSourceContext());
  9. }
  1. $_parent = $context['_parent'];
  2. unset($context['_seq'], $context['_key'], $context['a'], $context['_parent']);
  3. $context = array_intersect_key($context, $_parent) + $_parent;
  4. // line 1
  5. $this->parent = $this->load("front/base.html.twig", 1);
  6. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  7. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  8. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in vendor/twig/twig/src/Template.php -> doDisplay (line 411)
  1. $context += $this->env->getGlobals();
  2. $blocks = array_merge($this->blocks, $blocks);
  3. try {
  4. $this->ensureSecurityChecked();
  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 381)
  1. ob_start();
  2. } else {
  3. ob_start(static 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/front/ActualityController.php (line 20)
  1. }
  2. #[Route('/actualites/{slug}', name: 'app_news_show')]
  3. public function show(string $slug): Response
  4. {
  5. return $this->render('front/actualites/show.html.twig', [
  6. 'slug' => $slug,
  7. ]);
  8. }
  9. }
  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/violons-d-ingres.higumadev/html/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 function (array $context) {
  5. return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Logs

Level Channel Message
INFO 01:16:07 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "795a81"
    },
    "request_uri": "https://violons-d-ingres.higumadev.fr/_profiler/795a81?panel=exception&type=request",
    "method": "GET"
}

Stack Trace

RuntimeError
Twig\Error\RuntimeError:
Impossible to access an attribute ("title") on a null variable in "front/actualites/show.html.twig" at line 72.

  at templates/front/actualites/show.html.twig:72
  at Twig\Extension\CoreExtension::getAttribute()
     (var/cache/dev/twig/5a/5aff6d9a56acfaba2e73fc5998b7af6b.php:117)
  at __TwigTemplate_5d4c6b097b0cdb23625e2c989f078b17->block_title()
     (vendor/twig/twig/src/Template.php:456)
  at Twig\Template->yieldBlock()
     (var/cache/dev/twig/77/77dc68508c95d1accfed7239b006ef23.php:71)
  at __TwigTemplate_22fa4ea31740b5d3531f10885ff0d58d->doDisplay()
     (vendor/twig/twig/src/Template.php:411)
  at Twig\Template->yield()
     (var/cache/dev/twig/5a/5aff6d9a56acfaba2e73fc5998b7af6b.php:95)
  at __TwigTemplate_5d4c6b097b0cdb23625e2c989f078b17->doDisplay()
     (vendor/twig/twig/src/Template.php:411)
  at Twig\Template->yield()
     (vendor/twig/twig/src/Template.php:366)
  at Twig\Template->display()
     (vendor/twig/twig/src/Template.php:381)
  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/front/ActualityController.php:20)
  at App\Controller\front\ActualityController->show()
     (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/violons-d-ingres.higumadev/html/vendor/autoload_runtime.php')
     (public/index.php:5)