Exceptions
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 }
</div>{% endblock %}{% block form_label %}{% if label is not same as(false) %}<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 %}>{{ label|trans({}, translation_domain) }}{% if required %} *{% endif %}</label>{% endif %}{% endblock %}
Template->yieldBlock()
in
C:\inetpub\wwwroot\project-x.events\var\cache\dev\twig\ff\ff72e407e7b5bb0bc7ef50e129c30a25.php
(line 179)
if (!is_iterable($_v1)) {throw new RuntimeError('Variables passed to the "with" tag must be a mapping.', 13, $this->getSourceContext());}$_v1 = CoreExtension::toArray($_v1);$context = $_v1 + $context + $this->env->getGlobals();yield from $this->unwrap()->yieldBlock("label_attributes", $context, $blocks);$context = $_v0;yield ">";// line 14yield $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)
throw new \LogicException('A block must be a method on a \Twig\Template instance.');}if (null !== $template) {try {yield from $template->$block($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($template->getSourceContext());}
Template->yieldBlock()
in
C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php
(line 138)
* @param array $blocks The current set of blocks* @param bool $useBlocks Whether to use the current set of blocks*/public function displayBlock($name, array $context, array $blocks = [], $useBlocks = true, ?self $templateContext = null): void{foreach ($this->yieldBlock($name, $context, $blocks, $useBlocks, $templateContext) as $data) {echo $data;}}/**
Template->displayBlock()
in
C:\inetpub\wwwroot\project-x.events\vendor\symfony\twig-bridge\Form\TwigRendererEngine.php
(line 48)
// (with an empty cache) is guaranteed to invoke loadResourcesFromTheme(),// where the property $template is initialized.// We do not call renderBlock here to avoid too many nested level calls// (XDebug limits the level to 100 by default)$this->template->displayBlock($blockName, $context, $this->resources[$cacheKey]);return ob_get_clean();}/**
TwigRendererEngine->renderBlock()
in
C:\inetpub\wwwroot\project-x.events\vendor\symfony\form\FormRenderer.php
(line 241)
// We also need to store the variables for the view so that we can render other// blocks for the same view using the same variables as in the outer block.$this->variableStack[$viewCacheKey][] = $variables;// Do the rendering$html = $this->engine->renderBlock($view, $resource, $blockName, $variables);// Clear the stackarray_pop($this->variableStack[$viewCacheKey]);// Clear the caches if they were filled for the first time within
FormRenderer->searchAndRenderBlock()
in
C:\inetpub\wwwroot\project-x.events\var\cache\dev\twig\08\0883799040e863cdec96cc7f8bf8639e.php
(line 119)
<div style=\"display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-md);\"><div class=\"form-group\">";// line 17yield $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);"]]);yield "";// line 18yield $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);"]]);yield "
__TwigTemplate_36faac0fec984a01736a7fcea2202e8a->block_body()
in
C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php
(line 446)
throw new \LogicException('A block must be a method on a \Twig\Template instance.');}if (null !== $template) {try {yield from $template->$block($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($template->getSourceContext());}
Template->yieldBlock()
in
C:\inetpub\wwwroot\project-x.events\var\cache\dev\twig\0c\0c6b585732b63c96d86dc726239d835a.php
(line 262)
";// line 83yield from $this->load("_partials/flash_messages.html.twig", 83)->unwrap()->yield($context);// line 84yield " ";yield from $this->unwrap()->yieldBlock('body', $context, $blocks);// line 85yield " </main>";// line 88
__TwigTemplate_2b634be07d1446475b45cb4648df479d->doDisplay()
in
C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php
(line 402)
{$context += $this->env->getGlobals();$blocks = array_merge($this->blocks, $blocks);try {yield from $this->doDisplay($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($this->getSourceContext());}
Template->yield()
in
C:\inetpub\wwwroot\project-x.events\var\cache\dev\twig\08\0883799040e863cdec96cc7f8bf8639e.php
(line 54)
$__internal_6f47bbe9983af81f1e7450e9a3e3768f = $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];$__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template", "registration/register.html.twig"));$this->parent = $this->load("base.html.twig", 1);yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));$__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);$__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
__TwigTemplate_36faac0fec984a01736a7fcea2202e8a->doDisplay()
in
C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php
(line 402)
{$context += $this->env->getGlobals();$blocks = array_merge($this->blocks, $blocks);try {yield from $this->doDisplay($context, $blocks);} catch (Error $e) {if (!$e->getSourceContext()) {$e->setSourceContext($this->getSourceContext());}
Template->yield()
in
C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php
(line 358)
return $this->blocks;}public function display(array $context, array $blocks = []): void{foreach ($this->yield($context, $blocks) as $data) {echo $data;}}public function render(array $context): string
Template->display()
in
C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Template.php
(line 373)
ob_start();} else {ob_start(static function () { return ''; });}try {$this->display($context);} catch (\Throwable $e) {while (ob_get_level() > $level) {ob_end_clean();}
Template->render()
in
C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\TemplateWrapper.php
(line 51)
yield from $this->template->yieldBlock($name, $context);}public function render(array $context = []): string{return $this->template->render($context);}/*** @return void*/
TemplateWrapper->render()
in
C:\inetpub\wwwroot\project-x.events\vendor\twig\twig\src\Environment.php
(line 333)
* @throws SyntaxError When an error occurred during compilation* @throws RuntimeError When an error occurred during rendering*/public function render($name, array $context = []): string{return $this->load($name)->render($context);}/*** Displays a template.*
Environment->render()
in
C:\inetpub\wwwroot\project-x.events\vendor\symfony\framework-bundle\Controller\AbstractController.php
(line 462)
if (null !== $block) {return $this->container->get('twig')->load($view)->renderBlock($block, $parameters);}return $this->container->get('twig')->render($view, $parameters);}private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response{$content = $this->doRenderView($view, $block, $parameters, $method);
AbstractController->doRenderView()
in
C:\inetpub\wwwroot\project-x.events\vendor\symfony\framework-bundle\Controller\AbstractController.php
(line 467)
return $this->container->get('twig')->render($view, $parameters);}private function doRender(string $view, ?string $block, array $parameters, ?Response $response, string $method): Response{$content = $this->doRenderView($view, $block, $parameters, $method);$response ??= new Response();if (200 === $response->getStatusCode()) {foreach ($parameters as $v) {if ($v instanceof FormInterface && $v->isSubmitted() && !$v->isValid()) {
AbstractController->doRender()
in
C:\inetpub\wwwroot\project-x.events\vendor\symfony\framework-bundle\Controller\AbstractController.php
(line 279)
* If an invalid form is found in the list of parameters, a 422 status code is returned.* Forms found in parameters are auto-cast to form views.*/protected function render(string $view, array $parameters = [], ?Response $response = null): Response{return $this->doRender($view, null, $parameters, $response, __FUNCTION__);}/*** Renders a block in a view.*
AbstractController->render()
in
C:\inetpub\wwwroot\project-x.events\src\Controller\RegistrationController.php
(line 116)
return $this->redirectToRoute('app_login');}$captcha = $this->captchaService->generate();return $this->render('registration/register.html.twig', ['registrationForm' => $form,'captcha_question' => $captcha['question'],]);}
RegistrationController->register()
in
C:\inetpub\wwwroot\project-x.events\vendor\symfony\http-kernel\HttpKernel.php
(line 183)
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);$controller = $event->getController();$arguments = $event->getArguments();// call controller$response = $controller(...$arguments);// viewif (!$response instanceof Response) {$event = new ViewEvent($this, $request, $type, $response, $event);$this->dispatcher->dispatch($event, KernelEvents::VIEW);
HttpKernel->handleRaw()
in
C:\inetpub\wwwroot\project-x.events\vendor\symfony\http-kernel\HttpKernel.php
(line 76)
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());$this->requestStack->push($request);$response = null;try {return $response = $this->handleRaw($request, $type);} catch (\Throwable $e) {if ($e instanceof \Error && !$this->handleAllThrowables) {throw $e;}
HttpKernel->handle()
in
C:\inetpub\wwwroot\project-x.events\vendor\symfony\http-kernel\Kernel.php
(line 191)
if (!$this->handlingHttpCache) {$this->resetServices = true;}try {return $this->getHttpKernel()->handle($request, $type, $catch);} finally {--$this->requestStackSize;}}
Kernel->handle()
in
C:\inetpub\wwwroot\project-x.events\vendor\symfony\runtime\Runner\Symfony\HttpKernelRunner.php
(line 35)
) {}public function run(): int{$response = $this->kernel->handle($this->request);if (Kernel::VERSION_ID >= 60400) {$response->send(false);if (\function_exists('fastcgi_finish_request') && !$this->debug) {
HttpKernelRunner->run()
in
C:\inetpub\wwwroot\project-x.events\vendor\autoload_runtime.php
(line 32)
$app = $app(...$args);exit($runtime->getRunner($app)->run());
require_once('C:\\inetpub\\wwwroot\\project-x.events\\vendor\\autoload_runtime.php')
in
C:\inetpub\wwwroot\project-x.events\public\index.php
(line 5)
<?phpuse App\Kernel;require_once dirname(__DIR__).'/vendor/autoload_runtime.php';return static function (array $context) {return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);};
Logs
| Level | Channel | Message |
|---|---|---|
| INFO 12:54:19 | request |
Matched route "_profiler". {
"route": "_profiler",
"route_parameters": {
"_route": "_profiler",
"_controller": "web_profiler.controller.profiler::panelAction",
"token": "c858f3"
},
"request_uri": "https://www.project-x.events/_profiler/c858f3",
"method": "GET"
}
|
| INFO 12:54:19 | 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)
|