Exception thrown when viewing a node with an empty smart date

Created on 7 December 2023, 10 months ago
Updated 11 December 2023, 10 months ago

Problem/Motivation

Drupal 10.1.5

Exception thrown when viewing a node with an empty smart date (field not required):

Error: Call to a member function getOptions() on null in Drupal\smart_date\Plugin\Field\FieldFormatter\SmartDateFormatterBase->viewElements() (line 45 of modules/contrib/smart_date/src/SmartDateTrait.php).

Steps to reproduce

  1. Install the smart_date_recur sub-module.
  2. Create a content type with a smart date field. In my case left everything default except, checked the Allow recurring date values.
  3. Create a node with the newly created content type.

Proposed resolution

Patch incoming.

💬 Support request
Status

Closed: works as designed

Version

4.0

Component

Smart Date Recur

Created by

🇨🇦Canada slydevil Halifax

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