Exceptions
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 }
in
templates/front/actualites/show.html.twig
(line 72)
{% if a.slug == slug %}{% set currentArticle = a %}{% endif %}{% endfor %}{% block title %}{{ currentArticle.title }} — Les Violons d'Ingres{% endblock %}{% block body %}{# ── BREADCRUMB ────────────────────────────────────────────────────── #}<nav class="flex items-center gap-2 pt-28 pb-4 px-16 text-[0.78rem] text-stone">
in
var/cache/dev/twig/5a/5aff6d9a56acfaba2e73fc5998b7af6b.php
::
getAttribute
(line 117)
$__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block", "title"));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);yield " — Les Violons d\x27Ingres";$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in
vendor/twig/twig/src/Template.php
->
block_title
(line 456)
}if (null !== $template) {try {$template->ensureSecurityChecked();yield from $template->$block($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($template->getSourceContext());}
in
var/cache/dev/twig/77/77dc68508c95d1accfed7239b006ef23.php
->
yieldBlock
(line 71)
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\AssetExtension']->getAssetUrl("build/images/piano.ico"), "html", null, true);yield "\" type=\"image/x-icon\"><title>";// line 15yield from $this->unwrap()->yieldBlock('title', $context, $blocks);yield " | Les Violons d\x27Ingres</title></head><body>";// line 18
in
vendor/twig/twig/src/Template.php
->
doDisplay
(line 411)
$context += $this->env->getGlobals();$blocks = array_merge($this->blocks, $blocks);try {$this->ensureSecurityChecked();yield from $this->doDisplay($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($this->getSourceContext());}
in
var/cache/dev/twig/5a/5aff6d9a56acfaba2e73fc5998b7af6b.php
->
yield
(line 95)
$_parent = $context['_parent'];unset($context['_seq'], $context['_key'], $context['a'], $context['_parent']);$context = array_intersect_key($context, $_parent) + $_parent;// line 1$this->parent = $this->load("front/base.html.twig", 1);yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
in
vendor/twig/twig/src/Template.php
->
doDisplay
(line 411)
$context += $this->env->getGlobals();$blocks = array_merge($this->blocks, $blocks);try {$this->ensureSecurityChecked();yield from $this->doDisplay($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($this->getSourceContext());}
in
vendor/twig/twig/src/Template.php
->
yield
(line 366)
return $this->blocks;}public function display(array $context, array $blocks = []): void{foreach ($this->yield($context, $blocks) as $data) {echo $data;}}public function render(array $context): string
in
vendor/twig/twig/src/Template.php
->
display
(line 381)
ob_start();} else {ob_start(static function () { return ''; });}try {$this->display($context);} catch (\Throwable $e) {while (ob_get_level() > $level) {ob_end_clean();}
in
vendor/twig/twig/src/TemplateWrapper.php
->
render
(line 51)
yield from $this->template->yieldBlock($name, $context);}public function render(array $context = []): string{return $this->template->render($context);}/*** @return void*/
in
vendor/twig/twig/src/Environment.php
->
render
(line 333)
* @throws SyntaxError When an error occurred during compilation* @throws RuntimeError When an error occurred during rendering*/public function render($name, array $context = []): string{return $this->load($name)->render($context);}/*** Displays a template.*
in
vendor/symfony/framework-bundle/Controller/AbstractController.php
->
render
(line 467)
if (null !== $block) {return $this->container->get('twig')->load($view)->renderBlock($block, $parameters);}return $this->container->get('twig')->render($view, $parameters);}private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response{$content = $this->doRenderView($view, $block, $parameters, $method);
in
vendor/symfony/framework-bundle/Controller/AbstractController.php
->
doRenderView
(line 472)
return $this->container->get('twig')->render($view, $parameters);}private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response{$content = $this->doRenderView($view, $block, $parameters, $method);$response ??= new Response();if (200 === $response->getStatusCode()) {foreach ($parameters as $v) {if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
in
vendor/symfony/framework-bundle/Controller/AbstractController.php
->
doRender
(line 284)
* If an invalid form is found in the list of parameters, a 422 status code is returned.* Forms found in parameters are auto-cast to form views.*/protected function render(string $view, array $parameters = [], ?Response $response = null): Response{return $this->doRender($view, null, $parameters, $response, __FUNCTION__);}/*** Renders a block in a view.*
}#[Route('/actualites/{slug}', name: 'app_news_show')]public function show(string $slug): Response{return $this->render('front/actualites/show.html.twig', ['slug' => $slug,]);}}
in
vendor/symfony/http-kernel/HttpKernel.php
->
show
(line 183)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response, $event);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
in
vendor/symfony/http-kernel/HttpKernel.php
->
handleRaw
(line 76)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try {return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {if ($e instanceof \Error && !$this->handleAllThrowables) {throw $e;}
in
vendor/symfony/http-kernel/Kernel.php
->
handle
(line 193)
if (!$this->handlingHttpCache) {$this->resetServices = true;}try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
in
vendor/symfony/runtime/Runner/Symfony/HttpKernelRunner.php
->
handle
(line 35)
) {}public function run(): int{$response = $this->kernel->handle($this->request);if (Kernel::VERSION_ID >= 60400) {$response->send(false);if (\function_exists('fastcgi_finish_request') && !$this->debug) {
in
vendor/autoload_runtime.php
->
run
(line 32)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
require_once('/var/www/violons-d-ingres.higumadev/html/vendor/autoload_runtime.php')
in
public/index.php
(line 5)
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Logs
| Level | Channel | Message |
|---|---|---|
| INFO 00:52:55 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "43f7ad"
},
"request_uri": "https://violons-d-ingres.higumadev.fr/_profiler/43f7ad",
"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)
|