- Issue created by @arnoldbird
- Status changed to Closed: works as designed
11 months ago 1:47pm 31 May 2024 - ๐บ๐ธUnited States arnoldbird
I can no longer reproduce the bug. I suspect the bug was occurring because I was misusing a views template. The drupal_field() function is working fine in other contexts.
- Status changed to Active
about 1 month ago 11:02am 4 March 2025 - ๐ฎ๐ณIndia vinaygawade Sawantwadi, Maharashtra
I updated my site from Drupal 10.3.* to Drupal 10.4.3 and ran updates, but I'm still encountering the following error:
Twig\Error\SyntaxError: Unknown "isTranslationMessageShouldDisplay" function. in Twig\ExpressionParser->getFunction()
Hereโs how I defined the function:
/** * {@inheritdoc} * Returns custom Twig functions to Drupal. */ public function getFunctions() { return [ new \Twig\TwigFunction('get_display_name', [$this, 'get_display_name']), new \Twig\TwigFunction('isTranslationMessageShouldDisplay', [$this, 'isTranslationMessageShouldDisplay']), ]; }
I have cleared the cache multiple times, but the issue persists. I'm not sure what is causing this error. Any insights would be appreciated!
- ๐ฎ๐ณIndia vinaygawade Sawantwadi, Maharashtra
After updating the core and other modules locally and running the update script, the Admin Toolbar Links Access Filter module was being uninstalled. Since the my custom module depended on it, it was also uninstalled, leading to the previously mentioned issue.
I fixed it now. I'm facing the similar issue, pls provide a solution to resolve this. I have issues with multiple functions defined in the TwigExtenion