“Twig_Error_Syntax”,并显示消息“未知”“呈现”过滤器
我正在运行drupal 8,composer和npm来执行吞噬任务。
当我运行 npm 启动..我的任务管理器:我得到以下堆栈跟踪:
Fatal error: Uncaught exception 'Twig_Error_Syntax' with message 'Unknown "render" filter.' in /web/project/web/themes/emulsify/components/_patterns/04-templates/basic-page/_basic_page.twig:26
Stack trace:
#0 /web/project/web/themes/emulsify/pattern-lab/vendor/twig/twig/lib/Twig/ExpressionParser.php(481): Twig_ExpressionParser->getFilterNodeClass('render', 26)
#1 /web/project/web/themes/project_theme/pattern-lab/vendor/twig/twig/lib/Twig/ExpressionParser.php(466): Twig_ExpressionParser->parseFilterExpressionRaw(Object(Twig_Node_Expression_Name))
#2 /web/project/web/themes/project_theme/pattern-lab/vendor/twig/twig/lib/Twig/ExpressionParser.php(320): Twig_ExpressionParser->parseFilterExpression(Object(Twig_Node_Expression_Name))
#3 /web/project/web/themes/project_theme/pattern-lab/vendor/twig/twig/lib/Twig/ExpressionParser.php(212): Twig_ExpressionParser->parsePostfixExpression(Object(Twig_Node_Expression_Name))
#4 /web/project in /web/project/web/themes/project_theme/components/_patterns/04-templates/basic-page/_basic_page.twig on line 26
我已经考虑过通过作曲家安装树枝桥/ symfony树枝,但我似乎无法摆脱错误消息。
我只是放弃使用树枝过滤器“渲染”吗?
更新: 14/08/17
在尝试使用通过Drupal 8的twig_tweak模块提供的drupal_block函数时,我也遇到了同样的问题。