sugarcalendar-core icon indicating copy to clipboard operation
sugarcalendar-core copied to clipboard

Show Recurring events in archive view

Open growdev opened this issue 8 years ago • 11 comments

The archive view (example https://sugarlocal.com/events/ ) should show recurring events in the list of posts.

from sugarcalendar/standard#48:

I think you'd need to hook into pre_get_posts, perform a look up with sc_get_all_events(), extract the post IDs, then set post__in. Essentially duplicating the queries.

Let's go ahead and punt the archive view so we can get this finished up.

growdev avatar Feb 24 '17 04:02 growdev

The CPT approach here has gone stale (custom tables will make this easier.)

Let's close this out in favor of sugarcalendar/standard#155 and others.

JJJ avatar Jan 22 '19 09:01 JJJ

Sadly, I need to reopen this for 2.1.

A few support requests have come in, asking why recurring events do not appear in the archive/list views on the theme-side of the site.

The reason is because I've never seen a calendar work that way before, so I'm having a little bit of trouble imagining how it will work.

Say you create a birthday that recurs every year on the same day. Obviously, you don't know when that person is going to stop having birthdays, so it recurs forever. How do you paginate that on an achieve or taxonomy list of events?

Because WordPress pagination is not bound by time, you'd have an infinite number of pages just by having 1 endless event.

I don't think it makes much sense to artificially limit the recurrence to like 100 years, because you'd still end up with unexpected results.

To make this work, we need to reinvent the pagination, and if we are going to go that far, we might as well skip the work and go straight to having a Gutenberg block, IMO.

Will post more thoughts here soon.

JJJ avatar May 08 '19 07:05 JJJ

@JJJ my thoughts on this have always echoed what you just said.

One way we could address this is by introducing date ranges and filters on the archive view. Instead of /events being a standard post type archive as we're used to, transform it into a literal list version of the rendered calendar with date ranges.

If we adjust it to that, I think it makes sense.

pippinsplugins avatar May 08 '19 13:05 pippinsplugins

This just came up again on this HS ticket: https://secure.helpscout.net/conversation/866670374/121875?folderId=1909452

The customer's SC Event List widget in the sidebar is set to show Upcoming events:

Screen Shot 2019-05-31 at 15 19 32

The challenge is he has two additional events scheduled for June 12th and June 13th that are not appearing in the list since they are recurring events.

Per @JJJ comments on the ticket, I agree that adding additional options to the SC Event List widget can make this work:

  • an end-date/time, and
  • whether to include/exclude recurrences of events (not just the first occurrence) – choosing to include them will force end date/time to required.
  • a text input for "Days" defaulting to 30, allowing Sugar Calendar to narrow the results and determine the number of times all events would recur during that period of time before moving onto the next Events in the set.

gspice avatar May 31 '19 22:05 gspice

Another HS ticket came in requesting their recurring events appear in the Events List Widget: https://secure.helpscout.net/conversation/891618043/124126?folderId=1909452

I answered with a trimmed down version of @JJJ 's well-crafted response to ticket mentioned in the comment above.

gspice avatar Jul 01 '19 18:07 gspice

Another request for recurring to show in Event List Widget: https://secure.helpscout.net/conversation/1424232157/177540?folderId=1909447

shaynesanderson-zz avatar Feb 12 '21 16:02 shaynesanderson-zz

+1 https://secure.helpscout.net/conversation/1753572301/1734406?folderId=5717018

WRasada avatar Jan 12 '22 16:01 WRasada

+1 https://secure.helpscout.net/conversation/1782347750/1778739?folderId=5717013

WRasada avatar Feb 09 '22 14:02 WRasada

Another +1 here. I definitely see the dilemma from a code/functionality standpoint. I like the idea of it functioning like a list view of a calendar (contained by date filters) instead of a standard CPT archive.

From a user standpoint it's confusing, which is why we now see all of these +1's. There is a recurring event coming in n number of days, yet it's not in my list ([sc_events_list], widget, etc.).

JiveDig avatar Feb 10 '22 18:02 JiveDig

+1 here too for customers whose websites are organized around events/programs and selling access

skydogtech avatar Feb 10 '22 18:02 skydogtech

This is somewhat working since #253 was merged. Thanks! Some new weirdness is that the next occurrence that shows in the list is showing the date for the very first one instead of the next upcoming.

Example: We have a recurring event that started 6 months ago and repeats every month, indefinitely. The event list shortcode/function correctly displays this event now since it's coming up in the list, but the date that shows today is the first occurrence from 6 months ago, not the date of this months instance.

Hope that makes sense.

JiveDig avatar Apr 28 '22 15:04 JiveDig