"$use_cache=TRUE" in getCalendarTimestamp creates issues setting start date with relationship

Created on 27 November 2023, 7 months ago

Problem/Motivation

I want to create a calendar display that starts with the date of the first event. My date field for my events is in a paragraph bundle, so my view has a relationship to that bundle. I am able to see results and if I paginate forward to the month in which my events take place, I am able to see them as expected. However, the calendar does not default to the month of the first date.

Based on my research, the getCalendarTimestamp function in CalendarViewBase has $use_cache=TRUE. With this set, `$this->view->result` returns FALSE and as a result I'm not able to set a value for $first_timestamp. If I change the value to $use_cache=FALSE, the date is set as expected.

Steps to reproduce

  1. Create a content type with a date field in a Paragraph bundle
  2. Create a calendar view using the date in the Paragraph bundle as the calendar item date
  3. Create a node with a date in a month that's not the current month
  4. In the Views Format > Month settings, set the Default Date field to blank
  5. See that the calendar default date is "today" but the future items can be paged to
πŸ› Bug report
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States nxmassa

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

Comments & Activities

Production build 0.69.0 2024