Closed (duplicate)
Project:
Webform
Version:
6.3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2026 at 16:56 UTC
Updated:
25 Sep 2026 at 23:12 UTC
Jump to comment: Most recent
In my site with Drupal 10.6.17. I update from Webform 6.2.10 to webform 6.3.1 and all my site is down
I get this error:
TypeError: Twig\Runtime\EscaperRuntime::escape(): Argument #2 ($strategy) must be of type string, null given, called in /var/www/html/web/sites/default/files/php/twig/6ab6a5b8e24d4_webform-element-more.html_euh_/C7drXgL8.php on line 48 in Twig\Runtime\EscaperRuntime->escape() (line 94 of /var/www/html/vendor/twig/twig/src/Runtime/EscaperRuntime.php).
__TwigTemplate_a22fbcef465fd94dcf30bee1068630c7->doDisplay() (Line: 461)
Twig\Template->yield() (Line: 416)
Twig\Template->display() (Line: 431)
Twig\Template->render() (Line: 53)
Twig\TemplateWrapper->render() (Line: 33)
twig_render_template() (Line: 348)
Drupal\Core\Theme\ThemeManager->render() (Line: 490)
Drupal\Core\Render\Renderer->doRender() (Line: 248)
Drupal\Core\Render\Renderer->render() (Line: 165)
Drupal\Core\Render\Renderer->{closure:Drupal\Core\Render\Renderer::renderInIsolation():164}() (Line: 637)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 164)
Drupal\Core\Render\Renderer->renderInIsolation() (Line: 868)
Drupal\webform\Hook\WebformTokensHooks->renderMore() (Line: 215)
Drupal\webform\Hook\WebformTokensHooks->tokenInfo() (Line: 17)
webform_token_info()
call_user_func_array() (Line: 416)
Drupal\Core\Extension\ModuleHandler->{closure:Drupal\Core\Extension\ModuleHandler::invokeAll():415}() (Line: 395)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 415)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 40)
Drupal\token\Token->getInfo() (Line: 100)
Drupal\token\Token->getTokenInfo() (Line: 57)
Drupal\token\TokenModuleProvider->resolveCacheMiss() (Line: 149)
Drupal\Core\Cache\CacheCollector->get() (Line: 49)
Drupal\token\TokenModuleProvider->getTokenModule() (Line: 1074)
Drupal\token\Hook\TokenTokensHooks->fieldTokens() (Line: 82)
Drupal\token\Hook\TokenTokensHooks->tokens() (Line: 609)
token_tokens()
call_user_func_array() (Line: 416)
Drupal\Core\Extension\ModuleHandler->{closure:Drupal\Core\Extension\ModuleHandler::invokeAll():415}() (Line: 395)
Drupal\Core\Extension\ModuleHandler->invokeAllWith() (Line: 415)
Drupal\Core\Extension\ModuleHandler->invokeAll() (Line: 368)
Drupal\Core\Utility\Token->generate() (Line: 691)
Drupal\token\Hook\TokenTokensHooks->tokens() (Line: 609)
token_tokens()I can use the administration of the site or the site. I only get twig errors.
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
koffer commentedComment #4
alfynapoles commentedI can reproduce the same error on Drupal 10.6.17 with Webform 6.2.12 (not 6.3.1). In our case, the failure began when Composer updated twig/twig from v3.29.0 to v3.30.0; Webform was not updated in that deployment.
The stack trace likewise points to the compiled webform-element-more.html.twig and EscaperRuntime::escape() receiving null for $strategy. Reverting Twig to v3.29.0 resolves the issue. We have pinned Twig to v3.29.0 pending a compatible fix.
Comment #5
ayoub.elmansouri commentedHi,
This issue is actually not caused by the Webform module, but by a recent change in Twig 3.30 which affects Drupal Core.
The bug is being actively tracked and handled in this Drupal Core issue:
https://www.drupal.org/project/drupal/issues/3625969
I have already tested the Merge Request MR !17242 from that core ticket, and it successfully resolves this TypeError problem.
I suggest closing this ticket as a duplicate or moving it to "Postponed" until the fix is merged into Drupal Core.
Comment #6
koffer commentedThanks a lot for the answer. I try with another site and saw to problem (like you say) this is a problem with Drupal Core..
Comment #7
cilefen commentedComment #8
cilefen commentedComment #9
cilefen commentedFor what it's worth, the core bug crashes because a different function parameter is null, the fourth. This bug is about the second parameter.
Comment #10
liam morlandThere is a fix now for the core issue. Please see if applying that fix also fixes this issue.
Comment #11
ayoub.elmansouri commentedComment #13
koffer commentedI find why I get the error. when I update webform, twig update to.