[3.0] Stop seeding a recurrence rule into the recurrence dates - #9410
Merged
Sesquipedalian merged 1 commit intoAug 14, 2026
Merged
Conversation
Two of the holidays the installer creates, Cinco de Mayo and Groundhog Day, were given 'rdates' => 'FREQ=YEARLY'. That is their rrule, and every other yearly holiday in the same array has an empty rdates. rdates holds a list of dates. Holiday::list() takes the largest one and builds a \DateTimeImmutable out of it, so reading those two rows back throws "Failed to parse time string (FREQ=YEARLY) at position 0 (F)", and Admin -> Calendar -> Holidays is an error page on every fresh install. The migration clears any rdates value that starts with FREQ=, since a recurrence rule in that column can only have got there this way, so forums already installed from the bad seed are repaired too. Signed-off-by: Mathias Papenbrock <mathiaspapealbert@hotmail.com> Signed-off-by: albertlast <mathiaspapealbert@hotmail.com>
Closed
Sesquipedalian
approved these changes
Aug 14, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Admin → Calendar → Holidays is an error page on every fresh install:
Two of the holidays the installer creates carry their own recurrence rule in the recurrence dates column. In
Sources/Db/Schema/v3_0/Calendar.php:Same for Groundhog Day. Every other yearly holiday in that array has
'rdates' => '', and the 2.1 → 3.0 migration inHolidaysToEvents.phpgets both of these right, so this is only the fresh-install seed.rdatesholds a list of dates.Holiday::list()takes the largest one and builds a\DateTimeImmutableout of it:so reading either row back throws, and the whole page goes with it.
The migration
3.0 is still Alpha, but a forum installed from an earlier alpha already has the two bad rows and would keep the broken page after upgrading.
HolidayRecurrenceDatesclears anyrdatesstarting withFREQ=— a recurrence rule in that column can only have arrived this way, so the condition cannot catch a real date.Checked
On the running forum, with the migration's
UPDATEapplied by hand: Admin → Calendar → Holidays renders and lists all 28 holidays, Cinco de Mayo and Groundhog Day among them, with nothing added tosmf_log_errors.That check needed #9405 in the tree as well — without it the same page dies a little later, in
RecurrenceIterator, on the unrelatedSMF\TimeIntervalproblem. The two fixes are independent; this one does not depend on that one to be correct, only to be observable.Found by sweeping a stock forum's admin pages for fatals.
Issues References (Fixes|Related|Closes)
Related to #7933