Error 500 Internal Server Error

GET https://jonathan-websource.websrc.fr/blog

Forwarded to ErrorController (3156dd)

Exceptions

Neither the property "get" nor one of the methods "get()", "getget()", "isget()", "hasget()" or "__call()" exist and have public access in class "Symfony\Component\HttpFoundation\Request" in default/blog/home.html.twig at line 3.

Exception

Twig\Error\ RuntimeError

Show exception properties
Twig\Error\RuntimeError {#2660
  -lineno: 3
  -rawMessage: "Neither the property "get" nor one of the methods "get()", "getget()", "isget()", "hasget()" or "__call()" exist and have public access in class "Symfony\Component\HttpFoundation\Request"."
  -source: Twig\Source {#2569
    -code: """
      {% extends 'base.html.twig' %}\n
      \n
      {% if app.request.get('_route') == 'blog' %}\n
          {% set title = 'Notre blog' %}\n
          {% set description = 'Nous vous partageons notre retour d\'expérience et notre expertise dans ce blog.' %}\n
      {% else %}\n
          {% set title = currentCategory.name %}\n
          {% set description = 'Nos articles sur '~ currentCategory.name ~'. Nous vous partageons notre retour d\'expérience et notre expertise dans ce blog dédié à '~ currentCategory.name ~'.' %}\n
      {% endif %}\n
      {% block title %}{{ title }}{% endblock %}\n
      {% block description %}{{ description }}{% endblock %}\n
      {% block og_title %}{{ title }}{% endblock %}\n
      {% block og_description %}{{ description }}{% endblock %}\n
      \n
      {% block preload %}\n
          {{ parent() }}\n
      \n
          {# === PRELOAD RECENT POSTS (premier seul avec priorité high) === #}\n
          {% for post in recentPosts %}\n
              {% if loop.first %}\n
                  {# Main image recentPosts[0] #}\n
                  {% set mainImageFinal = '' %}\n
                  {% if post.image is defined and post.image is not empty %}\n
                      {% set parts = post.image|split('.') %}\n
                      {% set extOrig = parts|last %}\n
                      {% set pathNoExt = post.image|slice(0, post.image|length - extOrig|length - 1) %}\n
                      {% set candidates = [\n
                          uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '.avif',\n
                          uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '.' ~ extOrig ~ '.avif',\n
                          uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '.' ~ extOrig ~ '.webp',\n
                          uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '.webp',\n
                          uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '-368px.avif',\n
                          uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '-368px.webp',\n
                          uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '-368px.' ~ extOrig ~ '.avif',\n
                          uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '-368px.' ~ extOrig ~ '.webp',\n
                          uploads_dir ~ 'blog_posts/' ~ post.image\n
                      ] %}\n
                      {% for candidate in candidates %}\n
                          {% if mainImageFinal == '' and image_exists(candidate) %}\n
                              {% set mainImageFinal = candidate|trim %}\n
                          {% endif %}\n
                      {% endfor %}\n
                      {% if mainImageFinal == '' %}\n
                          {% set mainImageFinal = uploads_dir ~ 'blog_posts/' ~ post.image|trim %}\n
                      {% endif %}\n
                  {% endif %}\n
                  {% if mainImageFinal is defined and mainImageFinal is not empty and image_exists(mainImageFinal) %}\n
                      <link rel="preload" href="{{ absolute_url(asset(mainImageFinal)) }}" as="image" fetchpriority="high">\n
                  {% endif %}\n
      \n
                  {# Gallery images recentPosts[0] #}\n
                  {% for src in post.imgs %}\n
                      {% set galleryFinal = '' %}\n
                      {% if src is defined and src is not empty %}\n
                          {% set galleryParts = src|split('.') %}\n
                          {% set galleryExtOrig = galleryParts|last %}\n
                          {% set galleryPathNoExt = src|slice(0, src|length - galleryExtOrig|length - 1) %}\n
                          {% set galleryCandidates = [\n
                              galleryPathNoExt ~ '.avif',\n
                              galleryPathNoExt ~ '.' ~ galleryExtOrig ~ '.avif',\n
                              galleryPathNoExt ~ '.' ~ galleryExtOrig ~ '.webp',\n
                              galleryPathNoExt ~ '.webp',\n
                              src\n
                          ] %}\n
                          {% for candidate in galleryCandidates %}\n
                              {% if galleryFinal == '' and image_exists(candidate) %}\n
                                  {% set galleryFinal = candidate|trim %}\n
                              {% endif %}\n
                          {% endfor %}\n
                          {% if galleryFinal == '' %}\n
                              {% set galleryFinal = src|trim %}\n
                          {% endif %}\n
                      {% endif %}\n
                      {% if galleryFinal is defined and galleryFinal is not empty and image_exists(galleryFinal) %}\n
                          <link rel="preload" href="{{ absolute_url(asset(galleryFinal)) }}" as="image">\n
                      {% endif %}\n
                  {% endfor %}\n
              {% endif %}\n
          {% endfor %}\n
      \n
          {# === PRELOAD POSTS PAGINATION === #}\n
          {% for post in posts %}\n
              {# Main image #}\n
              {% set mainImageFinal = '' %}\n
              {% if post.image is defined and post.image is not empty %}\n
                  {% set parts = post.image|split('.') %}\n
                  {% set extOrig = parts|last %}\n
                  {% set pathNoExt = post.image|slice(0, post.image|length - extOrig|length - 1) %}\n
                  {% set candidates = [\n
                      uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '.avif',\n
                      uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '.' ~ extOrig ~ '.avif',\n
                      uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '.' ~ extOrig ~ '.webp',\n
                      uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '.webp',\n
                      uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '-368px.avif',\n
                      uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '-368px.webp',\n
                      uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '-368px.' ~ extOrig ~ '.avif',\n
                      uploads_dir ~ 'blog_posts/' ~ pathNoExt ~ '-368px.' ~ extOrig ~ '.webp',\n
                      uploads_dir ~ 'blog_posts/' ~ post.image\n
                  ] %}\n
                  {% for candidate in candidates %}\n
                      {% if mainImageFinal == '' and image_exists(candidate) %}\n
                          {% set mainImageFinal = candidate|trim %}\n
                      {% endif %}\n
                  {% endfor %}\n
                  {% if mainImageFinal == '' %}\n
                      {% set mainImageFinal = uploads_dir ~ 'blog_posts/' ~ post.image|trim %}\n
                  {% endif %}\n
              {% endif %}\n
              {% if mainImageFinal is defined and mainImageFinal is not empty and image_exists(mainImageFinal) %}\n
                  <link rel="preload" href="{{ absolute_url(asset(mainImageFinal)) }}" as="image" fetchpriority="high">\n
              {% endif %}\n
      \n
              {# Avatar #}\n
              {% set avatarFinal = '' %}\n
              {% if post.user and post.user.avatar is defined and post.user.avatar is not empty %}\n
                  {% set avatarParts = post.user.avatar|split('.') %}\n
                  {% set avatarExtOrig = avatarParts|last %}\n
                  {% set avatarPathNoExt = post.user.avatar|slice(0, post.user.avatar|length - avatarExtOrig|length - 1) %}\n
                  {% set avatarCandidates = [\n
                      'user/' ~ avatarPathNoExt ~ '.avif',\n
                      'user/' ~ avatarPathNoExt ~ '.' ~ avatarExtOrig ~ '.avif',\n
                      'user/' ~ avatarPathNoExt ~ '.' ~ avatarExtOrig ~ '.webp',\n
                      'user/' ~ avatarPathNoExt ~ '.webp',\n
                      'user/' ~ post.user.avatar\n
                  ] %}\n
                  {% for candidate in avatarCandidates %}\n
                      {% if avatarFinal == '' and image_exists(candidate) %}\n
                          {% set avatarFinal = candidate|trim %}\n
                      {% endif %}\n
                  {% endfor %}\n
                  {% if avatarFinal == '' %}\n
                      {% set avatarFinal = 'user/' ~ post.user.avatar|trim %}\n
                  {% endif %}\n
              {% endif %}\n
              {% if avatarFinal is defined and avatarFinal is not empty and image_exists(avatarFinal) %}\n
                  <link rel="preload" href="{{ absolute_url(asset(avatarFinal)) }}" as="image">\n
              {% elseif image_exists('images/default-avatar.png') %}\n
                  <link rel="preload" href="{{ absolute_url(asset('images/default-avatar.png')) }}" as="image">\n
              {% endif %}\n
      \n
              {# Gallery images #}\n
              {% for src in post.imgs %}\n
                  {% set galleryFinal = '' %}\n
                  {% if src is defined and src is not empty %}\n
                      {% set galleryParts = src|split('.') %}\n
                      {% set galleryExtOrig = galleryParts|last %}\n
                      {% set galleryPathNoExt = src|slice(0, src|length - galleryExtOrig|length - 1) %}\n
                      {% set galleryCandidates = [\n
                          galleryPathNoExt ~ '.avif',\n
                          galleryPathNoExt ~ '.' ~ galleryExtOrig ~ '.avif',\n
                          galleryPathNoExt ~ '.' ~ galleryExtOrig ~ '.webp',\n
                          galleryPathNoExt ~ '.webp',\n
                          src\n
                      ] %}\n
                      {% for candidate in galleryCandidates %}\n
                          {% if galleryFinal == '' and image_exists(candidate) %}\n
                              {% set galleryFinal = candidate|trim %}\n
                          {% endif %}\n
                      {% endfor %}\n
                      {% if galleryFinal == '' %}\n
                          {% set galleryFinal = src|trim %}\n
                      {% endif %}\n
                  {% endif %}\n
                  {% if galleryFinal is defined and galleryFinal is not empty and image_exists(galleryFinal) %}\n
                      <link rel="preload" href="{{ absolute_url(asset(galleryFinal)) }}" as="image">\n
                  {% endif %}\n
              {% endfor %}\n
          {% endfor %}\n
      {% endblock %}\n
      \n
      {% block body %}\n
          <!-- =============================================\n
               Blog List\n
          ============================================= -->\n
          <section class="pb-14 md:pb-16 lg:pb-[88px] xl:pb-[100px] xl:pt-[180px] md:pt-42 sm:pt-36 pt-32">\n
              <div class="main-container">\n
                  <div class="text-center space-y-3 mb-14 md:mb-[70px]">\n
                      <h2 data-ns-animate data-delay="0.2">\n
                          Nos\n
                          <span class="text-primary-500 inline-block">articles de blog</span>\n
                          les plus récents\n
                      </h2>\n
                      <p data-ns-animate data-delay="0.3" class="max-w-[738px] mx-auto">\n
                          Nos articles de blog autour de notre domaine d'activité vous aideront à mieux comprendre notre métier, comprendre notre domaine d'expertise pour peut-être vous aider à ouvrir communément la voie vers une future collaboration.\n
                      </p>\n
                  </div>\n
      \n
                  <!-- Blog List -->\n
                  <div class="grid grid-cols-12 max-md:gap-y-20 md:gap-5 lg:gap-16">\n
                      <div\n
                          class="max-md:col-span-full max-lg:col-span-7 lg:col-span-8 max-md:order-1  space-y-14 md:space-y-[70px]"\n
                      >\n
                          {# LISTE DES ARTICLES (PAGINATION) #}\n
                          {% for post in pagination %}\n
                              <article data-ns-animate data-delay="0.3" class="group">\n
                                  <div\n
                                      class="bg-background-2 dark:bg-background-6 rounded-[20px] relative overflow-hidden scale-100 hover:scale-[102%] transition-transform duration-500 hover:transition-transform hover:duration-500"\n
                                  >\n
                                      <div class="grid grid-cols-2 max-lg:grid-cols-1 gap-[26px] items-center">\n
                                          <figure class="lg:max-w-[380px] lg:max-h-[370px]">\n
                                              {% if post.image %}\n
      \n
                                                  {% set mainImage = uploads_dir ~ 'blog_posts/' ~ post.image %}\n
                                                  {% set mainImageOptimized = mainImage %}\n
                                                  {% set mainImageWebp = mainImage|replace({'.png': '.webp'}) %}\n
                                                  {% if image_exists(mainImageWebp) %}\n
                                                      {% set mainImage = mainImageWebp %}\n
                                                  {% elseif image_exists(mainImageOptimized) %}\n
                                                      {% set mainImage = mainImageOptimized %}\n
                                                  {% endif %}\n
      \n
                                                  {% set fetchpriority = false %}\n
                                                  {% if loop.first %}\n
                                                      {% set fetchpriority = 'high' %}\n
                                                  {% endif %}\n
      \n
                                                  {% include 'components/pictures.html.twig' with {\n
                                                      image: mainImage,\n
                                                      alt: post.title|raw|decode_html,\n
                                                      class: 'w-full object-cover rounded-[20px]',\n
                                                      fetchpriority: fetchpriority\n
                                                  } %}\n
                                              {% else %}\n
                                                  <div class="w-full h-full bg-gray-200 rounded-[20px] flex items-center justify-center">\n
                                                      <span class="text-gray-500 text-sm">No image</span>\n
                                                  </div>\n
                                              {% endif %}\n
                                          </figure>\n
      \n
                                          <!-- Blog Content -->\n
                                          <div class="max-lg:pl-4 pr-8 sm:py-8 py-5">\n
                                              <div class="flex items-center gap-2 mb-8">\n
                                                  {% if post.category %}\n
                                                      <span\n
                                                          class="badge badge-white font-medium dark:!bg-accent/10 dark:!text-accent/60 dark:backdrop-blur-[17px]"\n
                                                          aria-label="Article category"\n
                                                      >\n
                              {{ post.category.name }}\n
                            </span>\n
                                                  {% endif %}\n
      \n
                                                  {% for tag in post.tags %}\n
                                                      <span\n
                                                          class="badge badge-white font-medium dark:!bg-accent/10 dark:!text-accent/60 dark:backdrop-blur-[17px]"\n
                                                          aria-label="Article tag"\n
                                                      >\n
                              #{{ tag.name }}\n
                            </span>\n
                                                  {% endfor %}\n
                                              </div>\n
      \n
                                              <div class="flex items-center gap-4 mb-3">\n
                                                  <time\n
                                                      class="flex items-center gap-2 text-tagline-2 font-medium text-secondary/60 dark:text-accent/60"\n
                                                      datetime="{{ post.datePublication|date('Y-m-d') }}"\n
                                                  >\n
                                                      <svg\n
                                                          xmlns="http://www.w3.org/2000/svg"\n
                                                          width="20"\n
                                                          height="20"\n
                                                          viewBox="0 0 20 20"\n
                                                          fill="none"\n
                                                      >\n
                                                          <g clip-path="url(#clip0_date_icon)">\n
                                                              <path\n
                                                                  d="M14.1641 2.49992H17.4974C17.7184 2.49992 17.9304 2.58772 18.0866 2.744C18.2429 2.90028 18.3307 3.11224 18.3307 3.33325V16.6666C18.3307 16.8876 18.2429 17.0996 18.0866 17.2558C17.9304 17.4121 17.7184 17.4999 17.4974 17.4999H2.4974C2.27638 17.4999 2.06442 17.4121 1.90814 17.2558C1.75186 17.0996 1.66406 16.8876 1.66406 16.6666V3.33325C1.66406 3.11224 1.75186 2.90028 1.90814 2.744C2.06442 2.58772 2.27638 2.49992 2.4974 2.49992H5.83073V0.833252H7.4974V2.49992H12.4974V0.833252H14.1641V2.49992ZM16.6641 9.16658H3.33073V15.8332H16.6641V9.16658ZM12.4974 4.16658H7.4974V5.83325H5.83073V4.16658H3.33073V7.49992H16.6641V4.16658H14.1641V5.83325H12.4974V4.16658ZM4.9974 10.8333H6.66406V12.4999H4.9974V10.8333ZM9.16406 10.8333H10.8307V12.4999H9.16406V10.8333ZM13.3307 10.8333H14.9974V12.4999H13.3307V10.8333Z"\n
                                                                  class="fill-secondary dark:fill-stroke-8"\n
                                                              />\n
                                                          </g>\n
                                                          <defs>\n
                                                              <clipPath id="clip0_date_icon">\n
                                                                  <rect width="20" height="20" fill="white"/>\n
                                                              </clipPath>\n
                                                          </defs>\n
                                                      </svg>\n
                                                      {{ post.datePublication|date('d.m.Y') }}\n
                                                  </time>\n
      \n
                                                  <div\n
                                                      aria-hidden="true"\n
                                                      class="w-px inline-block h-5 bg-stroke-2 dark:bg-stroke-6"\n
                                                  ></div>\n
      \n
                                                  {# Durée de lecture approximative (optionnel) #}\n
                                                  <time\n
                                                      class="flex items-center gap-2 text-tagline-2 font-medium text-secondary/60 dark:text-accent/60"\n
                                                      datetime="PT1M"\n
                                                  >\n
                                                      <svg\n
                                                          xmlns="http://www.w3.org/2000/svg"\n
                                                          width="20"\n
                                                          height="20"\n
                                                          viewBox="0 0 20 20"\n
                                                          fill="none"\n
                                                      >\n
                                                          <g clip-path="url(#clip0_readtime_icon)">\n
                                                              <path\n
                                                                  d="M14.6813 4.97325L15.8921 3.76242L17.0705 4.94075L15.8596 6.15158C17.0561 7.64922 17.6337 9.54815 17.4739 11.4584C17.314 13.3686 16.4288 15.1451 15.0001 16.423C13.5713 17.701 11.7074 18.3833 9.7913 18.33C7.87515 18.2766 6.05215 17.4916 4.6967 16.1362C3.34125 14.7807 2.55625 12.9577 2.50291 11.0416C2.44957 9.12545 3.13193 7.2616 4.40987 5.83284C5.68781 4.40409 7.46432 3.51888 9.37453 3.35902C11.2847 3.19916 13.1837 3.77678 14.6813 4.97325ZM9.99964 16.6666C10.7657 16.6666 11.5242 16.5157 12.232 16.2225C12.9397 15.9294 13.5828 15.4997 14.1244 14.958C14.6661 14.4164 15.0958 13.7733 15.3889 13.0656C15.6821 12.3578 15.833 11.5993 15.833 10.8333C15.833 10.0672 15.6821 9.30866 15.3889 8.60093C15.0958 7.8932 14.6661 7.25014 14.1244 6.70846C13.5828 6.16679 12.9397 5.73711 12.232 5.44395C11.5242 5.1508 10.7657 4.99992 9.99964 4.99992C8.45255 4.99992 6.96881 5.6145 5.87485 6.70846C4.78089 7.80242 4.16631 9.28615 4.16631 10.8333C4.16631 12.3803 4.78089 13.8641 5.87485 14.958C6.96881 16.052 8.45255 16.6666 9.99964 16.6666ZM9.16631 6.66658H10.833V11.6666H9.16631V6.66658ZM6.66631 0.833252H13.333V2.49992H6.66631V0.833252Z"\n
                                                                  class="fill-secondary dark:fill-stroke-8"\n
                                                              />\n
                                                          </g>\n
                                                          <defs>\n
                                                              <clipPath id="clip0_readtime_icon">\n
                                                                  <rect width="20" height="20" fill="white"/>\n
                                                              </clipPath>\n
                                                          </defs>\n
                                                      </svg>\n
                                                      4 min\n
                                                  </time>\n
                                              </div>\n
      \n
                                              <h3 class="font-normal sm:text-heading-5 text-tagline-3 line-clamp-2 mb-4">\n
                                                  <a\n
                                                      href="{{ path('blog_post', {slug: post.slug}) }}"\n
                                                      aria-label="Read full article {{ post.title|striptags }}"\n
                                                  >\n
                                                      {{ post.title|raw|decode_html }}\n
                                                  </a>\n
                                              </h3>\n
      \n
                                              <p class="sm:text-tagline-1 text-tagline-2 font-normal text-secondary/60 dark:text-accent/60 line-clamp-2 mb-5">\n
                                                  {{ post.content|striptags|slice(0,220) ~ '…'|decode_html|raw }}\n
                                              </p>\n
      \n
                                              <div>\n
                                                  <a\n
                                                      href="{{ path('blog_post', {slug: post.slug}) }}"\n
                                                      class="btn btn-md btn-white hover:btn-primary dark:btn-transparent inline-block"\n
                                                      aria-label="Read full article {{ post.title|striptags }}"\n
                                                  >\n
                                                      <span>Lire plus</span>\n
                                                  </a>\n
                                              </div>\n
                                          </div>\n
                                      </div>\n
                                  </div>\n
                              </article>\n
                          {% else %}\n
                              <p class="text-center col-span-full text-gray-500 text-lg">\n
                                  No article found for now. Come back later!\n
                              </p>\n
                          {% endfor %}\n
      \n
                          {# PAGINATION #}\n
                          {% if pagination.pageCount > 1 %}\n
                              <div class="flex flex-wrap justify-center mt-10">\n
                                  {{ knp_pagination_render(pagination) }}\n
                              </div>\n
                          {% endif %}\n
                      </div>\n
      \n
                      <!-- Blog List Sidebar -->\n
                      <div\n
                          data-ns-animate\n
                          data-delay="0.3"\n
                          class="max-md:col-span-full max-lg:col-span-5 lg:col-span-4 max-md:order-2 blog-item bg-background-2 dark:bg-background-6 rounded-[20px] shadow-1 self-start space-y-[52px] max-w-full md:max-w-[410px] px-8 py-[44px]"\n
                      >\n
                          {# SEARCH #}\n
                          <form\n
                              action="{{ path('blog') }}"\n
                              method="get"\n
                              role="search"\n
                              aria-label="Search articles"\n
                              class="flex items-center justify-start gap-3 relative"\n
                          >\n
                              <input\n
                                  type="search"\n
                                  name="q"\n
                                  id="searchArticles"\n
                                  placeholder="Search articles"\n
                                  value="{{ app.request.get('q') }}"\n
                                  aria-label="Search articles"\n
                                  class="px-[18px] h-11 py-3 placeholder:text-secondary/60 rounded-[360px] focus:outline-1 focus:outline-primary-500 font-normal border placeholder:font-normal border-stroke-3 dark:border-stroke-7 dark:placeholder:text-accent/60 bg-background-1 dark:bg-background-6 shadow-1 max-md:max-w-full w-full dark:text-accent"\n
                              />\n
                              <button\n
                                  type="submit"\n
                                  aria-label="Submit search"\n
                                  class="absolute right-4 top-1/2 cursor-pointer -translate-y-1/2"\n
                              >\n
                                  <svg\n
                                      xmlns="http://www.w3.org/2000/svg"\n
                                      width="25"\n
                                      height="24"\n
                                      viewBox="0 0 25 24"\n
                                      fill="none"\n
                                  >\n
                                      <path\n
                                          d="M11.3404 18.6798C15.6446 18.6798 19.1339 15.1905 19.1339 10.8863C19.1339 6.58205 15.6446 3.09277 11.3404 3.09277C7.03615 3.09277 3.54688 6.58205 3.54688 10.8863C3.54688 15.1905 7.03615 18.6798 11.3404 18.6798Z"\n
                                          class="stroke-secondary dark:stroke-accent"\n
                                          stroke-linecap="round"\n
                                          stroke-linejoin="round"\n
                                      />\n
                                      <path\n
                                          d="M16.8516 16.3975L21.3607 20.9066"\n
                                          class="stroke-secondary dark:stroke-accent"\n
                                          stroke-linecap="round"\n
                                          stroke-linejoin="round"\n
                                      />\n
                                  </svg>\n
                              </button>\n
                          </form>\n
      \n
                          {# CATEGORIES #}\n
                          <div>\n
                              <h3 class="text-heading-5">Categories</h3>\n
                              <div class="space-y-2 mt-2.5">\n
                                  {% for blogpost in categories %}\n
                                      <a\n
                                          href="{{ path('blog_category', { categorySlug: blogpost.category.slug }) }}"\n
                                          class="flex items-center justify-between py-1.5 text-tagline-1 {{ app.request.get('category') == blogpost.category.slug ? 'text-primary-500' : 'hover:text-primary-500 dark:text-accent' }} transition-colors duration-300"\n
                                      >\n
                                          <span>{{ blogpost.category.name }}</span>\n
                                      </a>\n
                                  {% endfor %}\n
                              </div>\n
                          </div>\n
      \n
                          {# RECENT ARTICLES #}\n
                          <div>\n
                              <h3 class="text-heading-5">Articles récents</h3>\n
                              <div class="space-y-5 mt-6">\n
                                  {% for recent in recentPosts %}\n
                                      <div class="flex items-center gap-4">\n
                                          <figure\n
                                              class="max-w-[102px] w-full max-h-[77px] overflow-hidden rounded-[5px] flex-shrink-0"\n
                                          >\n
                                              {% set mainImage = uploads_dir ~ 'blog_posts/' ~ recent.image %}\n
                                              {% set mainImageOptimized = mainImage %}\n
                                              {% set mainImageWebp = mainImage|replace({'.png': '.webp'}) %}\n
                                              {% if image_exists(mainImageWebp) %}\n
                                                  {% set mainImage = mainImageWebp %}\n
                                              {% elseif image_exists(mainImageOptimized) %}\n
                                                  {% set mainImage = mainImageOptimized %}\n
                                              {% endif %}\n
      \n
                                              {% if recent.image %}\n
                                                  {% include 'components/pictures.html.twig' with {\n
                                                      image: mainImage,\n
                                                      alt: recent.title|raw|decode_html,\n
                                                      class: 'w-full object-cover'\n
                                                  } %}\n
                                              {% else %}\n
                                                  <div class="w-full h-full bg-gray-200 flex items-center justify-center">\n
                                                      <span class="text-gray-500 text-xs">No image</span>\n
                                                  </div>\n
                                              {% endif %}\n
                                          </figure>\n
                                          <div class="space-y-1 flex-1">\n
                                              <h4 class="text-tagline-1">\n
                                                  <a href="{{ path('blog_post', {slug: recent.slug}) }}" class="break-all">\n
                                                      {{ recent.title|raw|decode_html }}\n
                                                  </a>\n
                                              </h4>\n
      \n
                                              <p class="text-tagline-3">\n
                                                  {{ recent.datePublication|date('d M Y') }}\n
                                              </p>\n
                                          </div>\n
                                      </div>\n
                                  {% endfor %}\n
                              </div>\n
                          </div>\n
      \n
      \n
                          {#<div>\n
                              <h3 class="text-heading-5">Tags</h3>\n
                              <div class="flex flex-wrap gap-4 mt-6">\n
                                  {% for tag in tags.tags %}\n
                                      <a href="{{ path('blog', { tag: tag.slug }) }}">\n
                      <span\n
                          class="badge badge-white font-medium dark:!bg-transparent dark:!border dark:!border-stroke-5 dark:!text-accent/60 dark:backdrop-blur-[17px]"\n
                      >\n
                        {{ tag.slug }}\n
                      </span>\n
                                      </a>\n
                                  {% endfor %}\n
                              </div>\n
                          </div>#}\n
                      </div>\n
                  </div>\n
              </div>\n
          </section>\n
      {% endblock %}\n
      """
    -name: "default/blog/home.html.twig"
    -path: "/var/www/websource/jonathan-websource.websrc.fr/templates/default/blog/home.html.twig"
  }
  -phpFile: "/var/www/websource/jonathan-websource.websrc.fr/vendor/twig/twig/src/Extension/CoreExtension.php"
  -phpLine: 1893
}
  1. {% extends 'base.html.twig' %}
  2. {% if app.request.get('_route') == 'blog' %}
  3. {% set title = 'Notre blog' %}
  4. {% set description = 'Nous vous partageons notre retour d\'expérience et notre expertise dans ce blog.' %}
  5. {% else %}
  6. {% set title = currentCategory.name %}
  7. {% set description = 'Nos articles sur '~ currentCategory.name ~'. Nous vous partageons notre retour d\'expérience et notre expertise dans ce blog dédié à '~ currentCategory.name ~'.' %}
  1. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "default/blog/home.html.twig"));
  3. // line 3
  4. if ((CoreExtension::getAttribute($this->env, $this->source, CoreExtension::getAttribute($this->env, $this->source, (isset($context["app"]) || array_key_exists("app", $context) ? $context["app"] : (function () { throw new RuntimeError('Variable "app" does not exist.', 3, $this->source); })()), "request", [], "any", false, false, false, 3), "get", ["_route"], "method", false, false, false, 3) == "blog")) {
  5. // line 4
  6. $context["title"] = "Notre blog";
  7. // line 5
  8. $context["description"] = "Nous vous partageons notre retour d'expérience et notre expertise dans ce blog.";
  9. } else {
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/AbstractCoreController.php (line 184)
  1. if (!isset($parameters['error'])) {
  2. $parameters['error'] = null;
  3. }
  4. return parent::render($view, $parameters, $response);
  5. }
  6. protected function fetchDatas(EntityRepositoryInterface $entityRepository, $datas)
  7. {
  8. if (is_array($this->order) && isset($this->order[0]['column'], $this->order[0]['dir'])) {
AbstractCoreController->render() in src/Controller/Front/BlogController.php (line 102)
  1. $categories = $this->repo->getActiveCategories();
  2. $tags = $this->repo->getPopularTags();
  3. $recents = $this->repo->listLastPosts(null, ['e.id' => 'DESC'], 15)->getResult();
  4. return $this->render('default/blog/home.html.twig', [
  5. 'pagination' => $pagination,
  6. 'categories' => $categories,
  7. 'recentPosts' => $recents,
  8. 'tags' => $tags,
  9. 'search' => $search,
  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/websource/jonathan-websource.websrc.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 function (array $context) {
  5. return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  6. };

Logs

Level Channel Message
INFO 04:00:55 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "latest"
    },
    "request_uri": "https://www.jonathan-websource.websrc.fr/_profiler/latest?type=request&url=https%3A%2F%2Fwww.jonathan-websource.websrc.fr%2Fcontact",
    "method": "GET"
}
INFO 04:00:55 deprecation User Deprecated: Support for MySQL < 8 is deprecated and will be removed in DBAL 5 (AbstractMySQLDriver.php:75 called by AbstractDriverMiddleware.php:32, https://github.com/doctrine/dbal/pull/6343, package doctrine/dbal)
{
    "exception": {}
}

Stack Trace

RuntimeError
Twig\Error\RuntimeError:
Neither the property "get" nor one of the methods "get()", "getget()", "isget()", "hasget()" or "__call()" exist and have public access in class "Symfony\Component\HttpFoundation\Request" in "default/blog/home.html.twig" at line 3.

  at templates/default/blog/home.html.twig:3
  at Twig\Extension\CoreExtension::getAttribute()
     (var/cache/dev/twig/f4/f408384935be0e4ff7ed68d31d976c06.php:58)
  at __TwigTemplate_3c995d1dc591cd8190d374eab9840431->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:462)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRenderView()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:467)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRender()
     (vendor/symfony/framework-bundle/Controller/AbstractController.php:279)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render()
     (src/Controller/AbstractCoreController.php:184)
  at App\Controller\AbstractCoreController->render()
     (src/Controller/Front/BlogController.php:102)
  at App\Controller\Front\BlogController->blog()
     (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:191)
  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/websource/jonathan-websource.websrc.fr/vendor/autoload_runtime.php')
     (public/index.php:5)