Problem/Motivation
With the LocalGov Events remove expired module, it's possible to set events to be deleted when they become past events. To achieve this, the module looks at the cached dates table `date_recur__node__localgov_event_date` to determine if all future occurrences have finished. This works fine for events which have a fixed number of occurrences, as date_recur will generate all the occurrences. However for events that don't have an expiry date (Infinite occurrences) date_recur will generate a fixed number of occurrences in this table (default +2 years, but it configurable). Because of this, events that have infinite occurrences get deleted after they reach the end of all the generated occurrences.
Steps to reproduce
Ideally have some events with infinite occurrences already set up that are 2+ years old.
Enable the LocalGov Events remove expired submodule.
Set it up to unpublish or delete
Run cron until all events processed.
Expected result:
Events with infinite occurrences are left published
Actual result:
Those events get unpublished or deleted.
Proposed resolution
In the cron task, check and skip over events that are marked as infinite (this is included in the node__localgov_event_date as an infinite flag).
Remaining tasks
Write MR.
Issue fork localgov_events-3574339
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
andybroomfieldMerge request added.