- Issue created by @mandclu
- Status changed to Fixed
4 months ago 8:39am 15 August 2024 Automatically closed - issue fixed for 2 weeks with no activity.
I'm not 100% sure of the cause, but on a Drupal 11 site I got a fatal error using the recurring error in Drupal 11:
Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in /var/www/html/web/core/lib/Drupal/Component/Render/FormattableMarkup.php on line 256
After some troubleshooting, I identified that the problem resides in smart-date-recurring-text-rule.html.twig
, specifically this line:
{% trans %}{{ repeat }}{{ day_separator }}{{ day }}{{ month_separator }}{{ month }}{{ time_separator }}{{ time }}{{ limit_separator }}{{ limit }}{% endtrans %}
Further investigation revealed that the issue is actually the separators. Within SmartDateRule.php
they default to NULL. Setting their default to an empty string instead resolve the fatal errors.
Update SmartDateRule.php
to have the separator default to empty strings instead.
Fixed
4.1
Smart Date Recur
Automatically closed - issue fixed for 2 weeks with no activity.