stephenharris/Event-Organiser

The archives only show events which end within that day/month/year

stephenharris opened this issue · 0 comments

As discussed here: http://wp-event-organiser.com/forums/topic/day-archive-not-showing-events-spanning-several-days/#post-3371

From ahto on the forums:

But if you consider my example one more time, that is not how it actually works at the moment.

  1. The event is scheduled to occur later today.
  2. It highlights todays date in the calendar widget.
  3. I click on that date — the date that event starts on — and the list is empty.

It does not show an event starting on that day if the event crosses over to the days after. It only shows the event if it also ends on the same day.

It appears this bug affect would month & year archives too. The fix is to change https://github.com/stephenharris/Event-Organiser/blob/1.7/includes/event-organiser-archives.php#L83 to

  $query->set('event_end_before', $ondate_end);

Also discussed changing it so the archives list 'running events', i.e.:

 $query->set('event_start_before', $ondate_end );
 $query->set('event_end_after', $ondate_start );