- Issue created by @joel_osc
- Status changed to Closed: works as designed
about 2 years ago 3:48pm 8 March 2023 - 🇨🇦Canada joel_osc
Withdrawing this issue, code is working as designed. In case anyone else sees this error in php8.1 you may want to look at your twig and add a check to see if the field value is empty before rendering a "Text (formatted, long)" field in this manner:
{% if not node.field_my_textarea.value is empty %} {% set my_processed_text = { '#type': 'processed_text', '#text': node.field_my_textarea.value, '#format': 'rich_text', } %} {{ my_processed_text }} {% endif %}
Cheers!