Error 500 Internal Server Error

GET https://www.project-x.events/inscription

Exceptions

Block "label_attributes" on template "form/theme.html.twig" does not exist in form/theme.html.twig at line 13.

Exception

Twig\Error\ RuntimeError

Show exception properties
Twig\Error\RuntimeError {#1188
  -lineno: 13
  -rawMessage: "Block "label_attributes" on template "form/theme.html.twig" does not exist."
  -source: Twig\Source {#1190
    -code: """
      {% use 'form_div_layout.html.twig' %}\n
      \n
      {% block form_row %}\n
          <div class="form-group" style="margin-bottom: 1.25rem;">\n
              {{ form_label(form) }}\n
              {{ form_widget(form) }}\n
              {{ form_errors(form) }}\n
          </div>\n
      {% endblock %}\n
      \n
      {% block form_label %}\n
          {% if label is not same as(false) %}\n
              <label{% with {attr: label_attr|merge({style: 'display: block; margin-bottom: 0.4rem; color: var(--color-gold, #D4AF37); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.5px;'})} %}{{ block('label_attributes') }}{% endwith %}>\n
                  {{ label|trans({}, translation_domain) }}{% if required %} *{% endif %}\n
              </label>\n
          {% endif %}\n
      {% endblock %}\n
      \n
      {% block form_widget_simple %}\n
          <input type="{{ type }}" {{ block('widget_attributes') }}\n
                 style="width: 100%; padding: 0.75rem 1rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; color: #fff; font-size: 1rem; transition: border-color 0.2s; outline: none;"\n
                 onfocus="this.style.borderColor='#D4AF37'" onblur="this.style.borderColor='rgba(255,255,255,0.08)'"\n
                 {% if value is defined %}value="{{ value }}"{% endif %}>\n
      {% endblock %}\n
      \n
      {% block textarea_widget %}\n
          <textarea {{ block('widget_attributes') }}\n
                    style="width: 100%; padding: 0.75rem 1rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; color: #fff; font-size: 1rem; resize: vertical; min-height: 80px; transition: border-color 0.2s; outline: none;"\n
                    onfocus="this.style.borderColor='#D4AF37'" onblur="this.style.borderColor='rgba(255,255,255,0.08)'"\n
          >{{ value }}</textarea>\n
      {% endblock %}\n
      \n
      {% block choice_widget_collapsed %}\n
          <select {{ block('widget_attributes') }}\n
                  style="width: 100%; padding: 0.75rem 1rem; background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; color: #fff; font-size: 1rem;">\n
              {% if placeholder is not none %}\n
                  <option value=""{% if required and value is empty %} selected{% endif %}>{{ placeholder|trans({}, translation_domain) }}</option>\n
              {% endif %}\n
              {% for choice in choices %}\n
                  <option value="{{ choice.value }}"{% if choice.value == value %} selected{% endif %}>{{ choice.label|trans({}, translation_domain) }}</option>\n
              {% endfor %}\n
          </select>\n
      {% endblock %}\n
      \n
      {% block checkbox_widget %}\n
          <div style="display: flex; align-items: center; gap: 0.5rem;">\n
              <input type="checkbox" {{ block('widget_attributes') }}{% if checked %} checked{% endif %}\n
                     style="width: 18px; height: 18px; accent-color: #D4AF37;">\n
              {% if label is not same as(false) %}\n
                  <label for="{{ id }}" style="color: #fff; font-size: 0.9rem; cursor: pointer;">{{ label|trans({}, translation_domain) }}</label>\n
              {% endif %}\n
          </div>\n
      {% endblock %}\n
      \n
      {% block form_errors %}\n
          {% if errors|length > 0 %}\n
              {% for error in errors %}\n
                  <p style="color: #ff4444; font-size: 0.8rem; margin-top: 0.3rem;">{{ error.message }}</p>\n
              {% endfor %}\n
          {% endif %}\n
      {% endblock %}\n
      \n
      {% block button_widget %}\n
          <button type="{{ type|default('button') }}" {{ block('button_attributes') }}\n
                  class="btn btn-primary" style="padding: 0.75rem 2rem; margin-top: 0.5rem;">\n
              {{ label|trans({}, translation_domain) }}\n
          </button>\n
      {% endblock %}\n
      """
    -name: "form/theme.html.twig"
    -path: "C:\inetpub\wwwroot\project-x.events\templates\form\theme.html.twig"
  }
  -phpFile: "C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php"
  -phpLine: 470
}
  1. </div>
  2. {% endblock %}
  3. {% block form_label %}
  4. {% if label is not same as(false) %}
  5. <label{% with {attr: label_attr|merge({style: 'display: block; margin-bottom: 0.4rem; color: var(--color-gold, #D4AF37); font-size: 0.85rem; font-weight: 500; letter-spacing: 0.5px;'})} %}{{ block('label_attributes') }}{% endwith %}>
  6. {{ label|trans({}, translation_domain) }}{% if required %} *{% endif %}
  7. </label>
  8. {% endif %}
  9. {% endblock %}
  1. if (!is_iterable($_v1)) {
  2. throw new RuntimeError('Variables passed to the "with" tag must be a mapping.', 13, $this->getSourceContext());
  3. }
  4. $_v1 = CoreExtension::toArray($_v1);
  5. $context = $_v1 + $context + $this->env->getGlobals();
  6. yield from $this->unwrap()->yieldBlock("label_attributes", $context, $blocks);
  7. $context = $_v0;
  8. yield ">
  9. ";
  10. // line 14
  11. yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->extensions['Symfony\Bridge\Twig\Extension\TranslationExtension']->trans((isset($context["label"]) || array_key_exists("label", $context) ? $context["label"] : (function () { throw new RuntimeError('Variable "label" does not exist.', 14, $this->source); })()), [], (isset($context["translation_domain"]) || array_key_exists("translation_domain", $context) ? $context["translation_domain"] : (function () { throw new RuntimeError('Variable "translation_domain" does not exist.', 14, $this->source); })())), "html", null, true);
__TwigTemplate_d948996360fa9e42adc5976461e6f9c5->block_form_label() in C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php (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. * @param array $blocks The current set of blocks
  2. * @param bool $useBlocks Whether to use the current set of blocks
  3. */
  4. public function displayBlock($name, array $context, array $blocks = [], $useBlocks = true, ?self $templateContext = null): void
  5. {
  6. foreach ($this->yieldBlock($name, $context, $blocks, $useBlocks, $templateContext) as $data) {
  7. echo $data;
  8. }
  9. }
  10. /**
  1. // (with an empty cache) is guaranteed to invoke loadResourcesFromTheme(),
  2. // where the property $template is initialized.
  3. // We do not call renderBlock here to avoid too many nested level calls
  4. // (XDebug limits the level to 100 by default)
  5. $this->template->displayBlock($blockName, $context, $this->resources[$cacheKey]);
  6. return ob_get_clean();
  7. }
  8. /**
  1. // We also need to store the variables for the view so that we can render other
  2. // blocks for the same view using the same variables as in the outer block.
  3. $this->variableStack[$viewCacheKey][] = $variables;
  4. // Do the rendering
  5. $html = $this->engine->renderBlock($view, $resource, $blockName, $variables);
  6. // Clear the stack
  7. array_pop($this->variableStack[$viewCacheKey]);
  8. // Clear the caches if they were filled for the first time within
  1. <div style=\"display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md);\">
  2. <div class=\"form-group\">
  3. ";
  4. // line 17
  5. yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["registrationForm"]) || array_key_exists("registrationForm", $context) ? $context["registrationForm"] : (function () { throw new RuntimeError('Variable "registrationForm" does not exist.', 17, $this->source); })()), "firstName", [], "any", false, false, false, 17), 'label', ["label_attr" => ["style" => "display: block; margin-bottom: 0.5rem; color: var(--color-gold); font-size: var(--text-sm);"]]);
  6. yield "
  7. ";
  8. // line 18
  9. yield $this->env->getRuntime('Symfony\Component\Form\FormRenderer')->searchAndRenderBlock(CoreExtension::getAttribute($this->env, $this->source, (isset($context["registrationForm"]) || array_key_exists("registrationForm", $context) ? $context["registrationForm"] : (function () { throw new RuntimeError('Variable "registrationForm" does not exist.', 18, $this->source); })()), "firstName", [], "any", false, false, false, 18), 'widget', ["attr" => ["class" => "form-input", "style" => "width: 100%; padding: 0.75rem 1rem; background: rgba(255,255,255,0.05); border: 1px solid var(--glass-border); border-radius: 8px; color: var(--color-white); font-size: var(--text-base);"]]);
  10. yield "
__TwigTemplate_36faac0fec984a01736a7fcea2202e8a->block_body() in C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php (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. ";
  2. // line 83
  3. yield from $this->load("_partials/flash_messages.html.twig", 83)->unwrap()->yield($context);
  4. // line 84
  5. yield " ";
  6. yield from $this->unwrap()->yieldBlock('body', $context, $blocks);
  7. // line 85
  8. yield " </main>
  9. ";
  10. // line 88
__TwigTemplate_2b634be07d1446475b45cb4648df479d->doDisplay() in C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php (line 402)
  1. {
  2. $context += $this->env->getGlobals();
  3. $blocks = array_merge($this->blocks, $blocks);
  4. try {
  5. yield from $this->doDisplay($context, $blocks);
  6. } catch (Error $e) {
  7. if (!$e->getSourceContext()) {
  8. $e->setSourceContext($this->getSourceContext());
  9. }
  1. $__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  2. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "registration/register.html.twig"));
  3. $this->parent = $this->load("base.html.twig", 1);
  4. yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
  5. $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  6. $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
__TwigTemplate_36faac0fec984a01736a7fcea2202e8a->doDisplay() in C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php (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
  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. *
  1. return $this->redirectToRoute('app_login');
  2. }
  3. $captcha = $this->captchaService->generate();
  4. return $this->render('registration/register.html.twig', [
  5. 'registrationForm' => $form,
  6. 'captcha_question' => $captcha['question'],
  7. ]);
  8. }
  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) {
  1. $app = $app(...$args);
  2. exit(
  3. $runtime
  4. ->getRunner($app)
  5. ->run()
  6. );
require_once('C:\\inetpub\\wwwroot\\project-x.events\\vendor\\autoload_runtime.php') in C:\inetpub\wwwroot\project-x.events\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 13:39:39 request Matched route "_profiler".
{
    "route": "_profiler",
    "route_parameters": {
        "_route": "_profiler",
        "_controller": "web_profiler.controller.profiler::panelAction",
        "token": "29303b"
    },
    "request_uri": "https://www.project-x.events/_profiler/29303b?panel=exception&type=request",
    "method": "GET"
}
INFO 13:39:39 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:
Block "label_attributes" on template "form/theme.html.twig" does not exist in "form/theme.html.twig" at line 13.

  at C:\inetpub\wwwroot\project-x.events\templates\form\theme.html.twig:13
  at Twig\Template->yieldBlock()
     (C:\inetpub\wwwroot\project-x.events\var\cache\dev\twig\ff\ff72e407e7b5bb0bc7ef50e129c30a25.php:179)
  at __TwigTemplate_d948996360fa9e42adc5976461e6f9c5->block_form_label()
     (C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php:446)
  at Twig\Template->yieldBlock()
     (C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php:138)
  at Twig\Template->displayBlock()
     (C:\inetpub\wwwroot\project-x.events\vendor\symfony\twig-bridge\Form\TwigRendererEngine.php:48)
  at Symfony\Bridge\Twig\Form\TwigRendererEngine->renderBlock()
     (C:\inetpub\wwwroot\project-x.events\vendor\symfony\form\FormRenderer.php:241)
  at Symfony\Component\Form\FormRenderer->searchAndRenderBlock()
     (C:\inetpub\wwwroot\project-x.events\var\cache\dev\twig\08\0883799040e863cdec96cc7f8bf8639e.php:119)
  at __TwigTemplate_36faac0fec984a01736a7fcea2202e8a->block_body()
     (C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php:446)
  at Twig\Template->yieldBlock()
     (C:\inetpub\wwwroot\project-x.events\var\cache\dev\twig\0c\0c6b585732b63c96d86dc726239d835a.php:262)
  at __TwigTemplate_2b634be07d1446475b45cb4648df479d->doDisplay()
     (C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php:402)
  at Twig\Template->yield()
     (C:\inetpub\wwwroot\project-x.events\var\cache\dev\twig\08\0883799040e863cdec96cc7f8bf8639e.php:54)
  at __TwigTemplate_36faac0fec984a01736a7fcea2202e8a->doDisplay()
     (C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php:402)
  at Twig\Template->yield()
     (C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php:358)
  at Twig\Template->display()
     (C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php:373)
  at Twig\Template->render()
     (C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\TemplateWrapper.php:51)
  at Twig\TemplateWrapper->render()
     (C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Environment.php:333)
  at Twig\Environment->render()
     (C:\inetpub\wwwroot\project-x.events\vendor\symfony\framework-bundle\Controller\AbstractController.php:462)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRenderView()
     (C:\inetpub\wwwroot\project-x.events\vendor\symfony\framework-bundle\Controller\AbstractController.php:467)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->doRender()
     (C:\inetpub\wwwroot\project-x.events\vendor\symfony\framework-bundle\Controller\AbstractController.php:279)
  at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render()
     (C:\inetpub\wwwroot\project-x.events\src\Controller\RegistrationController.php:116)
  at App\Controller\RegistrationController->register()
     (C:\inetpub\wwwroot\project-x.events\vendor\symfony\http-kernel\HttpKernel.php:183)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw()
     (C:\inetpub\wwwroot\project-x.events\vendor\symfony\http-kernel\HttpKernel.php:76)
  at Symfony\Component\HttpKernel\HttpKernel->handle()
     (C:\inetpub\wwwroot\project-x.events\vendor\symfony\http-kernel\Kernel.php:191)
  at Symfony\Component\HttpKernel\Kernel->handle()
     (C:\inetpub\wwwroot\project-x.events\vendor\symfony\runtime\Runner\Symfony\HttpKernelRunner.php:35)
  at Symfony\Component\Runtime\Runner\Symfony\HttpKernelRunner->run()
     (C:\inetpub\wwwroot\project-x.events\vendor\autoload_runtime.php:32)
  at require_once('C:\\inetpub\\wwwroot\\project-x.events\\vendor\\autoload_runtime.php')
     (C:\inetpub\wwwroot\project-x.events\public\index.php:5)