Empty description_field fallback outputs ‘Array’ in DESCRIPTION

Created on 8 August 2025, 8 days ago

Problem/Motivation

When building events, description_field can be empty. In this case, date_ical interprets the empty value as if the field setting itself were empty and falls back to rendering the description using the row's available fields. If one of those fields is an array, it gets string-cast when being joined with "\n", resulting in the literal text Array appearing in the exported .ics.

In the reported case, the body field was chosen for description_field but contained no content. This triggered the fallback logic, and one of the other displayed fields in the row caused the unwanted Array output. The issue was worked around by excluding non-body fields from output so that the row no longer contained the problematic field.

This appears distinct from #3477349 🐛 Descriptions with newline characters cause invalid ics files to be generated Active (newline/folding compliance). That issue is about RFC 5545 line folding/escaping of plain text, whereas this is about empty-field fallback and array casting.

Steps to reproduce

  1. Configure description_field to point to a field (e.g., body) that is empty on a given row.
  2. Ensure another displayed field in the row is an array (e.g., structured field output).
  3. Export iCal.

Expected result

  • DESCRIPTION contains only the intended plain-text description (no HTML, no “Array”).
  • No fallback from empty description_field unless explicitly desired.

Actual result

  • DESCRIPTION contains the literal text Array when an array field is included in fallback rendering.

Proposed resolution

  • When description_field is set but empty, treat it as an intentional empty description rather than falling back to other fields.
  • If fallback is still desired, normalize all field values to strings before concatenation to avoid “Array” artifacts.
  • Optionally, provide a setting to toggle fallback behavior for empty description_field.

Related issues

🐛 Bug report
Status

Active

Version

4.0

Component

iCal Export

Created by

🇨🇦Canada joelpittet Vancouver

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024