Problem with upcoming event list not showing all events
-
Hi. We’re using the spiffy calendar on our website and it has been great – many thanks for developing it.
We updated to version 2.0.1 the other day, and a problem with the upcoming event list has become apparent. We have monthly recurring events and use the upcoming event list to show them over the next 3 months (90 days). Most of our events are currently not appearing in the list even though they should – and they do appear fine on the calendar and mini-cal.
Looking at the SQL on lines 2094-2113 of spiffy-calendar.php, it looks like there are two problems going on (for annual and both types of monthly recurring events only):
1. It looks like it will only find events that recur right up to the end of the 90 days – so our monthly events that will only recur up to December are no longer being shown (as they stop recurring sooner than 90 days time).
2. It looks like it will only find events that start before or during the current year (the comparison between $date1 and event_begin in the SQL) – so events that start in 2016 won’t appear in the list until it actually is 2016.
I modified the SQL so that it found all events that recur during any part of the 90 day period, but that then meant that events that stop recurring before the end of the period are wrongly shown as recurring right up to the end (as once grab_events() has found the event, filter_events() doesn’t then check to see if it has stopped recurring before the specific date being filtered for). For example, our monthly event that finishes in November is shown as continuing into December.
I can totally see the rationale behind changing the code to first read events from the database (just once), then filter to see if any occur on each day, but if the database read is modified to find all events recurring during any part of the upcoming list period (which I think it should), then the filtering code needs to consider when recurring events should stop recurring.
We would be very grateful if these issues could be resolved. If any of the above isn’t clear, let me know and I will try to explain better. Thanks.
- The topic ‘Problem with upcoming event list not showing all events’ is closed to new replies.