- Issue created by @codebymikey
- Merge request !134Issue #3458783: Ensure the month limit is consistent with the field definition settings → (Open) created by codebymikey
- Status changed to Needs review
6 months ago 1:33pm 3 July 2024
There's some inconsistency between the dates generated during cron and what is generated on initial field addition.
This is because the \Drupal\smart_date_recur\SmartDateRecurManager::getMonthsLimit()
function expects a field definition, but is occassionally passed a SmartDateRule entity, this results in:
Create a new recurring smart date field, that only extends to 6 months.
Create a new piece of content with that date field that repeats and doesn't end.
It'll create only 6 months worth of dates, but when you go back and manage instances for the date, 12 months worth of dates are shown even though only 6 are persisted in the database.
This also has the side effect of queue/cron runs unintentionally generating 12 months worth of dates even if the field in question is configured for only 6.
Ensure that the underlying Smart Date Rule entity's field config definition is always used to determine the month limit so the behaviour is a bit more consistent.
N/A.
Needs review
4.1
Code