Error 500 Internal Server Error

GET https://www.jeteco.fr/lieux

Forwarded to ErrorController (ff3043)

Exceptions

An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "app_dechet_show" as such route does not exist.") in lieux/index.html.twig at line 193.

Exceptions 2

Twig\Error\ RuntimeError

Show exception properties
Twig\Error\RuntimeError {#4242
  -lineno: 193
  -rawMessage: "An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "app_dechet_show" as such route does not exist.")."
  -source: Twig\Source {#4249
    -code: """
      {% extends 'base.html.twig' %}\n
      \n
      {# Définition de variables de contexte pour les titres #}\n
      {% set titreContextuel %}\n
          {% if type and ville %}Points de {{ type|lower }} à {{ ville }}\n
              {% elseif type %}Tous les lieux de type {{ type|lower }}\n
              {% elseif ville %}Où recycler et réparer à {{ ville }}\n
          {% else %}Tous les lieux de collecte et recyclage{% endif %}\n
      {% endset %}\n
      \n
      {% block title %}{{ titreContextuel|trim }} — JetEco{% endblock %}\n
      \n
      {% block head %}\n
          {{ parent() }}\n
          <meta name="description" content="{{ titreContextuel|trim }}. Retrouvez {{ total }} adresses pour recycler, donner ou réparer vos objets. Horaires, contacts et services disponibles.">\n
          {# Gestion du canonical : on garde l'index sans filtres pour éviter le duplicate content massif #}\n
          <link rel="canonical" href="{{ url('app_lieux_index') }}">\n
          {% if page > 1 %}\n
              <link rel="prev" href="{{ path('app_lieux_index', {page: page - 1, search: search, ville: ville, type: type}) }}">\n
          {% endif %}\n
          {% if page < totalPages %}\n
              <link rel="next" href="{{ path('app_lieux_index', {page: page + 1, search: search, ville: ville, type: type}) }}">\n
          {% endif %}\n
      {% endblock %}\n
      \n
      {% block body %}\n
      <div class="container py-5">\n
      \n
          {# Breadcrumb #}\n
          <nav aria-label="breadcrumb" class="mb-4">\n
              <ol class="breadcrumb">\n
                  <li class="breadcrumb-item"><a href="{{ path('app_default_home') }}" class="text-success">Accueil</a></li>\n
                  <li class="breadcrumb-item active">Tous les lieux</li>\n
              </ol>\n
          </nav>\n
      \n
          {# En-tête #}\n
          <div class="row mb-5">\n
              <div class="col-lg-8">\n
                  {# Remplacement de l'en-tête #}\n
                  <h1 class="fw-bold mb-3">\n
                      <i class="bi bi-geo-alt-fill text-success me-2"></i>\n
                      {{ titreContextuel|trim }}\n
                  </h1>\n
                  <p class="lead text-muted">\n
                      JetEco a répertorié <strong>{{ total }} solutions éco-responsables</strong>\n
                      {% if ville %}à {{ ville }}{% else %}partout en France{% endif %}\n
                      pour vous aider à réduire vos déchets.\n
                  </p>\n
              </div>\n
              <div class="col-lg-4 text-lg-end">\n
                  <a href="{{ path('app_default_carte') }}" class="btn btn-primary btn-lg">\n
                      <i class="bi bi-map me-2"></i>\n
                      Voir la carte\n
                  </a>\n
              </div>\n
          </div>\n
      \n
          {# Filtres #}\n
          <div class="card border-0 shadow-sm mb-4">\n
              <div class="card-body p-4">\n
                  <p class="h5 fw-bold mb-3">\n
                      <i class="bi bi-funnel me-2"></i>\n
                      Filtrer les lieux\n
                  </p>\n
      \n
                  <form method="get" action="{{ path('app_lieux_index') }}">\n
                      <div class="row g-3">\n
                          {# Recherche par nom #}\n
                          <div class="col-md-4">\n
                              <label for="search" class="form-label">Rechercher un lieu :</label>\n
                              <input type="text" class="form-control" id="search" name="search"\n
                                     value="{{ search }}" placeholder="Nom du lieu...">\n
                          </div>\n
      \n
                          {# Filtre ville #}\n
                          <div class="col-md-4">\n
                              <label for="ville" class="form-label">Ville :</label>\n
                              <select class="form-select" id="ville" name="ville">\n
                                  <option value="">Toutes les villes</option>\n
                                  {% for v in villes|slice(0, 50) %}\n
                                      <option value="{{ v }}" {% if ville == v %}selected{% endif %}>{{ v }}</option>\n
                                  {% endfor %}\n
                              </select>\n
                          </div>\n
      \n
                          {# Filtre type #}\n
                          <div class="col-md-4">\n
                              <label for="type" class="form-label">Type de lieu :</label>\n
                              <select class="form-select" id="type" name="type">\n
                                  <option value="">Tous les types</option>\n
                                  {% for t in types %}\n
                                      <option value="{{ t }}" {% if type == t %}selected{% endif %}>{{ t }}</option>\n
                                  {% endfor %}\n
                              </select>\n
                          </div>\n
                      </div>\n
      \n
                      <div class="d-flex gap-2 mt-3">\n
                          <button type="submit" class="btn btn-success">\n
                              <i class="bi bi-search me-1"></i>\n
                              Filtrer\n
                          </button>\n
                          <a href="{{ path('app_lieux_index') }}" class="btn btn-outline-secondary">\n
                              <i class="bi bi-x-circle me-1"></i>\n
                              Réinitialiser\n
                          </a>\n
                      </div>\n
                  </form>\n
              </div>\n
          </div>\n
      \n
          {# Résultats #}\n
          <div class="d-flex justify-content-between align-items-center mb-3">\n
              <h2 class="h5 mb-0">\n
                  {{ total }} lieu(x) trouvé(s)\n
                  {% if search or ville or type %}\n
                      <small class="text-muted">avec les filtres actifs</small>\n
                  {% endif %}\n
              </h2>\n
              <span class="badge bg-primary">Page {{ page }} / {{ totalPages }}</span>\n
          </div>\n
      \n
          {% if lieux is empty %}\n
              <div class="alert alert-warning">\n
                  <i class="bi bi-exclamation-triangle me-2"></i>\n
                  Aucun lieu trouvé avec ces critères. Essayez de modifier vos filtres.\n
              </div>\n
          {% else %}\n
              {# Liste des lieux #}\n
              <div class="row g-4 mb-5">\n
                  {% for lieu in lieux %}\n
                      <div class="col-md-6 col-lg-4">\n
                          <div class="card h-100 border-0 shadow-sm">\n
                              <div class="card-body">\n
                                  <h3 class="h5 card-title fw-bold mb-2 text-light">\n
                                      <a href="{{ path('app_lieu_show', {slug: lieu.slug}) }}" class="text-decoration-none text-dark">\n
                                          {{ lieu.nom }}\n
                                      </a>\n
                                  </h3>\n
      \n
                                  {% if lieu.type %}\n
                                      <span class="badge bg-secondary mb-2">{{ lieu.type }}</span>\n
                                  {% endif %}\n
      \n
                                  {% if lieu.adresse %}\n
                                      <p class="mb-1 small">\n
                                          <i class="bi bi-geo-alt text-danger me-1"></i>\n
                                          {{ lieu.adresse }}\n
                                      </p>\n
                                  {% endif %}\n
      \n
                                  <p class="mb-1 small">\n
                                      <i class="bi bi-building text-primary me-1"></i>\n
                                      {{ lieu.ville }}{% if lieu.codePostal %} - {{ lieu.codePostal }}{% endif %}\n
                                  </p>\n
      \n
                                  {% if lieu.telephone %}\n
                                      <p class="mb-1 small">\n
                                          <i class="bi bi-telephone text-success me-1"></i>\n
                                          <a href="tel:{{ lieu.telephone }}">{{ lieu.telephone }}</a>\n
                                      </p>\n
                                  {% endif %}\n
      \n
                                  {% if lieu.siteWeb %}\n
                                      <p class="mb-1 small">\n
                                          <i class="bi bi-globe text-info me-1"></i>\n
                                          <a href="{{ lieu.siteWeb }}" target="_blank" rel="noopener">Site web</a>\n
                                      </p>\n
                                  {% endif %}\n
      \n
                                  {# Aperçu des catégories #}\n
                                  {% if lieu.categories %}\n
                                      <div class="mt-2">\n
                                          <small class="text-muted">Services :</small>\n
                                          <div class="mt-1">\n
                                              {% for cat in lieu.categories|split('|')|slice(0, 3) %}\n
                                                  <span class="badge bg-light text-dark me-1" style="font-size: 0.65rem;">\n
                                                      {{ cat|replace({'_': ' '})|title }}\n
                                                  </span>\n
                                              {% endfor %}\n
                                              {% if lieu.categories|split('|')|length > 3 %}\n
                                                  <span class="badge bg-light text-dark" style="font-size: 0.65rem;">\n
                                                      +{{ lieu.categories|split('|')|length - 3 }}\n
                                                  </span>\n
                                              {% endif %}\n
                                          </div>\n
                                          {# Dans la boucle for lieu in lieux, après les services #}\n
                                          <div class="mt-2 small">\n
                                              <span class="text-muted">Besoin de recycler ?</span>\n
                                              <div class="d-flex flex-wrap gap-1 mt-1">\n
                                                  {# Exemple : si vous avez une correspondance entre catégories et déchets types #}\n
                                                  <a href="{{ path('app_dechet_show', {slug: 'ampoule'}) }}" class="text-success text-decoration-none">Ampoules</a>,\n
                                                  <a href="{{ path('app_dechet_show', {slug: 'piles'}) }}" class="text-success text-decoration-none">Piles</a>...\n
                                              </div>\n
                                          </div>\n
                                      </div>\n
                                  {% endif %}\n
                              </div>\n
                              <div class="card-footer bg-transparent border-0">\n
                                  <a href="{{ path('app_lieu_show', {slug: lieu.slug}) }}" class="btn btn-sm btn-outline-primary w-100">\n
                                      <i class="bi bi-arrow-right-circle me-1"></i>\n
                                      Voir les détails\n
                                  </a>\n
                              </div>\n
                          </div>\n
                      </div>\n
                  {% endfor %}\n
              </div>\n
      \n
              {# Pagination #}\n
              {% if totalPages > 1 %}\n
                  <nav aria-label="Pagination">\n
                      <ul class="pagination justify-content-center">\n
                          {# Première page #}\n
                          <li class="page-item {% if page == 1 %}disabled{% endif %}">\n
                              <a class="page-link" href="{{ path('app_lieux_index', {\n
                                  page: 1,\n
                                  search: search,\n
                                  ville: ville,\n
                                  type: type\n
                              }) }}">\n
                                  <i class="bi bi-chevron-double-left"></i>\n
                              </a>\n
                          </li>\n
      \n
                          {# Page précédente #}\n
                          <li class="page-item {% if page == 1 %}disabled{% endif %}">\n
                              <a class="page-link" href="{{ path('app_lieux_index', {\n
                                  page: page - 1,\n
                                  search: search,\n
                                  ville: ville,\n
                                  type: type\n
                              }) }}">\n
                                  <i class="bi bi-chevron-left"></i>\n
                              </a>\n
                          </li>\n
      \n
                          {# Pages numériques (avec ellipse) #}\n
                          {% for p in 1..totalPages %}\n
                              {% if p == 1 or p == totalPages or (p >= page - 2 and p <= page + 2) %}\n
                                  <li class="page-item {% if p == page %}active{% endif %}">\n
                                      <a class="page-link" href="{{ path('app_lieux_index', {\n
                                          page: p,\n
                                          search: search,\n
                                          ville: ville,\n
                                          type: type\n
                                      }) }}">\n
                                          {{ p }}\n
                                      </a>\n
                                  </li>\n
                              {% elseif p == page - 3 or p == page + 3 %}\n
                                  <li class="page-item disabled">\n
                                      <span class="page-link">...</span>\n
                                  </li>\n
                              {% endif %}\n
                          {% endfor %}\n
      \n
                          {# Page suivante #}\n
                          <li class="page-item {% if page == totalPages %}disabled{% endif %}">\n
                              <a class="page-link" href="{{ path('app_lieux_index', {\n
                                  page: page + 1,\n
                                  search: search,\n
                                  ville: ville,\n
                                  type: type\n
                              }) }}">\n
                                  <i class="bi bi-chevron-right"></i>\n
                              </a>\n
                          </li>\n
      \n
                          {# Dernière page #}\n
                          <li class="page-item {% if page == totalPages %}disabled{% endif %}">\n
                              <a class="page-link" href="{{ path('app_lieux_index', {\n
                                  page: totalPages,\n
                                  search: search,\n
                                  ville: ville,\n
                                  type: type\n
                              }) }}">\n
                                  <i class="bi bi-chevron-double-right"></i>\n
                              </a>\n
                          </li>\n
                      </ul>\n
                  </nav>\n
      \n
                  <p class="text-center text-muted small">\n
                      Affichage de {{ (page - 1) * limit + 1 }} à {{ min(page * limit, total) }} sur {{ total }} lieux\n
                  </p>\n
              {% endif %}\n
              <section class="mt-5 pt-5 border-top">\n
                  <div class="row">\n
                      <div class="col-md-8">\n
                          <h3 class="h4 fw-bold">Comment choisir le bon point de collecte ?</h3>\n
                          <p class="text-muted">\n
                              Il existe plusieurs réseaux de tri en France. Les <strong>recycleries</strong> et <strong>ressourceries</strong>\n
                              sont à privilégier pour le don d'objets en bon état. Pour les appareils en panne, tournez-vous vers les\n
                              <strong>réparateurs labellisés QualiRépar</strong>. Les <strong>déchèteries</strong> reçoivent quant à elles\n
                              les déchets dangereux ou encombrants ne pouvant être réutilisés.\n
                          </p>\n
                      </div>\n
                  </div>\n
              </section>\n
          {% endif %}\n
      \n
      </div>\n
      \n
      {# Mentions légales ADEME #}\n
      {% include '_partials/ademe_attribution.html.twig' %}\n
      \n
      {# Schema.org pour SEO #}\n
      <script type="application/ld+json">\n
      {\n
        "@context": "https://schema.org",\n
        "@type": "CollectionPage",\n
        "name": "Tous les lieux de collecte et recyclage",\n
        "description": "Annuaire complet des points de collecte, recycleries, ateliers de réparation et déchèteries en France.",\n
        "url": "{{ url('app_lieux_index') }}",\n
        "numberOfItems": {{ total }},\n
        "itemListElement": [\n
          {% for lieu in lieux|slice(0, 10) %}\n
          {\n
            "@type": "LocalBusiness",\n
            "name": "{{ lieu.nom|e('js') }}",\n
            "address": {\n
              "@type": "PostalAddress",\n
              "streetAddress": "{{ lieu.adresse|e('js') }}",\n
              "addressLocality": "{{ lieu.ville|e('js') }}",\n
              "postalCode": "{{ lieu.codePostal|e('js') }}",\n
              "addressCountry": "FR"\n
            }{% if lieu.latitude and lieu.longitude %},\n
            "geo": {\n
              "@type": "GeoCoordinates",\n
              "latitude": {{ lieu.latitude }},\n
              "longitude": {{ lieu.longitude }}\n
            }{% endif %}{% if lieu.telephone %},\n
            "telephone": "{{ lieu.telephone|e('js') }}"{% endif %}{% if lieu.siteWeb %},\n
            "url": "{{ lieu.siteWeb|e('js') }}"{% endif %}\n
          }{% if not loop.last %},{% endif %}\n
          {% endfor %}\n
        ]\n
      }\n
      </script>\n
      \n
      {% endblock %}\n
      \n
      """
    -name: "lieux/index.html.twig"
    -path: "/var/www/vhosts/api.bzh.be/jeteco.fr/templates/lieux/index.html.twig"
  }
  -phpFile: "/var/www/vhosts/api.bzh.be/jeteco.fr/vendor/twig/twig/src/Template.php"
  -phpLine: 460
}
  1. {# Dans la boucle for lieu in lieux, après les services #}
  2. <div class="mt-2 small">
  3. <span class="text-muted">Besoin de recycler ?</span>
  4. <div class="d-flex flex-wrap gap-1 mt-1">
  5. {# Exemple : si vous avez une correspondance entre catégories et déchets types #}
  6. <a href="{{ path('app_dechet_show', {slug: 'ampoule'}) }}" class="text-success text-decoration-none">Ampoules</a>,
  7. <a href="{{ path('app_dechet_show', {slug: 'piles'}) }}" class="text-success text-decoration-none">Piles</a>...
  8. </div>
  9. </div>
  10. </div>
  11. {% endif %}
  1. </nav>
  2. <main>
  3. ";
  4. // line 80
  5. yield from $this->unwrap()->yieldBlock('body', $context, $blocks);
  6. // line 81
  7. yield "</main>
  8. <footer class=\"mt-5 py-4 border-top text-center text-muted small\">
  9. <div class=\"container\">
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. }
  2. yield from [];
  3. })())) ? '' : new Markup($tmp, $this->env->getCharset());
  4. // line 1
  5. $this->parent = $this->load("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 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(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/LieuxController.php (line 75)
  1. ->getQuery()
  2. ->getSingleColumnResult();
  3. $types = $lieuRepo->findDistinctTypes();
  4. return $this->render('lieux/index.html.twig', [
  5. 'lieux' => $lieux,
  6. 'total' => $total,
  7. 'page' => $page,
  8. 'totalPages' => $totalPages,
  9. 'limit' => $limit,
  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/vhosts/api.bzh.be/jeteco.fr/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 static function (array $context) {
  5. return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Symfony\Component\Routing\Exception\ RouteNotFoundException

Unable to generate a URL for the named route "app_dechet_show" as such route does not exist.

  1. }
  2. } while (false !== $locale = strstr($locale, '_', true));
  3. }
  4. if (!isset($this->compiledRoutes[$name])) {
  5. throw new RouteNotFoundException(\sprintf('Unable to generate a URL for the named route "%s" as such route does not exist.', $name));
  6. }
  7. [$variables, $defaults, $requirements, $tokens, $hostTokens, $requiredSchemes, $deprecations] = $this->compiledRoutes[$name] + [6 => []];
  8. foreach ($deprecations as $deprecation) {
in vendor/symfony/routing/Router.php -> generate (line 172)
  1. $this->configCacheFactory = $configCacheFactory;
  2. }
  3. public function generate(string $name, array $parameters = [], int $referenceType = self::ABSOLUTE_PATH): string
  4. {
  5. return $this->getGenerator()->generate($name, $parameters, $referenceType);
  6. }
  7. public function match(string $pathinfo): array
  8. {
  9. return $this->getMatcher()->match($pathinfo);
  1. ];
  2. }
  3. public function getPath(string $name, array $parameters = [], bool $relative = false): string
  4. {
  5. return $this->generator->generate($name, $parameters, $relative ? UrlGeneratorInterface::RELATIVE_PATH : UrlGeneratorInterface::ABSOLUTE_PATH);
  6. }
  7. public function getUrl(string $name, array $parameters = [], bool $schemeRelative = false): string
  8. {
  9. return $this->generator->generate($name, $parameters, $schemeRelative ? UrlGeneratorInterface::NETWORK_PATH : UrlGeneratorInterface::ABSOLUTE_URL);
  1. <span class=\"text-muted\">Besoin de recycler ?</span>
  2. <div class=\"d-flex flex-wrap gap-1 mt-1\">
  3. ";
  4. // line 193
  5. yield " <a href=\"";
  6. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_dechet_show", ["slug" => "ampoule"]);
  7. yield "\" class=\"text-success text-decoration-none\">Ampoules</a>,
  8. <a href=\"";
  9. // line 194
  10. yield $this->extensions['Symfony\Bridge\Twig\Extension\RoutingExtension']->getPath("app_dechet_show", ["slug" => "piles"]);
  11. yield "\" class=\"text-success text-decoration-none\">Piles</a>...
in vendor/twig/twig/src/Template.php -> block_body (line 446)
  1. throw new \LogicException('A block must be a method on a \Twig\Template instance.');
  2. }
  3. if (null !== $template) {
  4. try {
  5. yield from $template->$block($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($template->getSourceContext());
  9. }
  1. </nav>
  2. <main>
  3. ";
  4. // line 80
  5. yield from $this->unwrap()->yieldBlock('body', $context, $blocks);
  6. // line 81
  7. yield "</main>
  8. <footer class=\"mt-5 py-4 border-top text-center text-muted small\">
  9. <div class=\"container\">
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. }
  2. yield from [];
  3. })())) ? '' : new Markup($tmp, $this->env->getCharset());
  4. // line 1
  5. $this->parent = $this->load("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 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(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/LieuxController.php (line 75)
  1. ->getQuery()
  2. ->getSingleColumnResult();
  3. $types = $lieuRepo->findDistinctTypes();
  4. return $this->render('lieux/index.html.twig', [
  5. 'lieux' => $lieux,
  6. 'total' => $total,
  7. 'page' => $page,
  8. 'totalPages' => $totalPages,
  9. 'limit' => $limit,
  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/vhosts/api.bzh.be/jeteco.fr/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 static function (array $context) {
  5. return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Logs

Level Channel Message
INFO 20:59:24 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "latest"
    },
    "request_uri": "https://www.jeteco.fr/_profiler/latest?ip=213.209.159.229&type=request",
    "method": "GET"
}

Stack Traces 2

[2/2] RuntimeError
Twig\Error\RuntimeError:
An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "app_dechet_show" as such route does not exist.") in "lieux/index.html.twig" at line 193.

  at templates/lieux/index.html.twig:193
  at Twig\Template->yieldBlock()
     (var/cache/dev/twig/10/10c7f3df08791b1682854f92853a159f.php:156)
  at __TwigTemplate_6b3e18ff30a8e513ca848f376cd2f39a->doDisplay()
     (vendor/twig/twig/src/Template.php:402)
  at Twig\Template->yield()
     (var/cache/dev/twig/06/066253476d8a45662ef8899b15ba4903.php:85)
  at __TwigTemplate_36a838bb1b347cfa6d077c1ec067ac23->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/LieuxController.php:75)
  at App\Controller\LieuxController->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: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/vhosts/api.bzh.be/jeteco.fr/vendor/autoload_runtime.php')
     (public/index.php:5)                
[1/2] RouteNotFoundException
Symfony\Component\Routing\Exception\RouteNotFoundException:
Unable to generate a URL for the named route "app_dechet_show" as such route does not exist.

  at vendor/symfony/routing/Generator/CompiledUrlGenerator.php:52
  at Symfony\Component\Routing\Generator\CompiledUrlGenerator->generate()
     (vendor/symfony/routing/Router.php:172)
  at Symfony\Component\Routing\Router->generate()
     (vendor/symfony/twig-bridge/Extension/RoutingExtension.php:43)
  at Symfony\Bridge\Twig\Extension\RoutingExtension->getPath()
     (var/cache/dev/twig/06/066253476d8a45662ef8899b15ba4903.php:522)
  at __TwigTemplate_36a838bb1b347cfa6d077c1ec067ac23->block_body()
     (vendor/twig/twig/src/Template.php:446)
  at Twig\Template->yieldBlock()
     (var/cache/dev/twig/10/10c7f3df08791b1682854f92853a159f.php:156)
  at __TwigTemplate_6b3e18ff30a8e513ca848f376cd2f39a->doDisplay()
     (vendor/twig/twig/src/Template.php:402)
  at Twig\Template->yield()
     (var/cache/dev/twig/06/066253476d8a45662ef8899b15ba4903.php:85)
  at __TwigTemplate_36a838bb1b347cfa6d077c1ec067ac23->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/LieuxController.php:75)
  at App\Controller\LieuxController->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: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/vhosts/api.bzh.be/jeteco.fr/vendor/autoload_runtime.php')
     (public/index.php:5)