Event that spans more than one day gets wrong startdate
-
So I’ve identified a problem with the Event Calendar Widget. If you have enabled the option to show long events, the query from the Calendar Widget modifies the data start-date stored for the event in wp_cache.
Example: I have an event that spans 2013-10-29 to 2013-10-31. The first call to eo_get_the_occurrences_of(17091) does a database query and returns the correct date.
The next call to the same function with the same ID correctly returns the data from the cache, with the correct start_date (2013-10-29).
However, the third call (the second to the cache) returns 2013-11-01 as start-date, still for the same event with the same event id (17091).
In my template, the sidebar is called before the loop, so the Event Calendar Widget is the responsible function for these first eo_get_the_occurrences_of-queries.
If I disable the widget, the start-date never is modified and the loop displays the correct start-date. I have from my loop done several (repeatedly) calls to eo_get_the_occurrences_of to the same ID but the start-date stays the same, unmodified.It is my conclusion that some code in the Event Calendar Widget gets the cache by reference or compares a hash against the stored cache-hash and does a faulty update of the cache when the event spans more than one day.
I have yet to look at the widget code to verify this, but something happens there.
- The topic ‘Event that spans more than one day gets wrong startdate’ is closed to new replies.