From bd0dce58ce59e78a2340a24dfddb2949582ae342 Mon Sep 17 00:00:00 2001 From: Martin Anderson-Clutz <mandclu@gmail.com> Date: Wed, 15 Feb 2023 03:11:28 -0500 Subject: [PATCH] Issue #3341733 by Barry_Fisher, mandclu: LogicException: Render context is empty, because render() was called outside of a renderRoot() or renderPlain() call --- modules/smart_date_recur/smart_date_recur.tokens.inc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/smart_date_recur/smart_date_recur.tokens.inc b/modules/smart_date_recur/smart_date_recur.tokens.inc index fb54562c..f3a0a12c 100644 --- a/modules/smart_date_recur/smart_date_recur.tokens.inc +++ b/modules/smart_date_recur/smart_date_recur.tokens.inc @@ -127,7 +127,7 @@ function smart_date_recur_tokens($type, $tokens, array $data, array $options, Bu $rrules_processed[] = $rrid; } // @todo More structure or markup around mutiple values? - $output = \Drupal::service('renderer')->render($rule_text); + $output = \Drupal::service('renderer')->renderPlain($rule_text); $replacements[$original] = $output; continue; } // End rule_text token processing. @@ -207,7 +207,7 @@ function smart_date_recur_tokens($type, $tokens, array $data, array $options, Bu } } - $output = \Drupal::service('renderer')->render($values); + $output = \Drupal::service('renderer')->renderPlain($values); $replacements[$original] = $output; } return $replacements; -- GitLab