Typed Property Error in DateRecurFilter when Adding “Occurrences filter for Date (Datetime)” to Views

Created on 15 April 2025, 6 days ago

Problem/Motivation

When adding the “Occurrences filter for Date (Datetime)” filter to a View, an AJAX HTTP error (500) occurs. The error message indicates that the typed property $largestDate in Drupal\date_recur\Plugin\views\filter\DateRecurFilter is being accessed before it has been initialized.

Steps to reproduce

  • Add and configure the "Occurrences filter for Date (Datetime)" filter to a View with the occurances relationship setup on a field_date field.


Expected Behavior:

The View should render and process the filter correctly without triggering an unexpected error.

Actual Behavior:
Upon preview, the View triggers an AJAX error leading to a HTTP 500 error. The specific error thrown is:
Typed property Drupal\date_recur\Plugin\views\filter\DateRecurFilter::$largestDate must not be accessed before initialization in DateRecurFilter->query() (line 128)

Proposed resolution

TBD

🐛 Bug report
Status

Active

Version

3.8

Component

Code

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