SDRefugeeTutoring / sdrt-custom-functions

Custom Functions for SDRefugeeTutoring.com
The Unlicense
2 stars 0 forks source link

[EXTREME HIGH - VOL. PORTAL] Upcoming Events Page Displaying Past Events #96

Closed dreazee closed 1 year ago

dreazee commented 1 year ago

Hi @JasonTheAdams ! Okay, so the Volunteer Portal Upcoming Events page is showing Sessions that have passed already. EX- Today it is still showing the Oct 4 tutoring events 😵‍💫 Easy and fast fix? 🙏 🤞

JasonTheAdams commented 1 year ago

Hmm, it's looking correct to me. I checked on the live site as well.

image
dreazee commented 1 year ago

So strange. After your comment, I checked again and it was displaying correctly. A few people accidentally RSVP'd to Oct 4 events through the portal yesterday, though. Let's stick a pin in this and I will see if it updates correctly after today's sessions.

dreazee commented 1 year ago

@JasonTheAdams So I just took the screenshot below. I switch to a different User (Meg Stewart), navigated around the site a bit, and then went into the Portal, hit refresh and the Oct 18 dates were still showing up. Screenshot (99)

JasonTheAdams commented 1 year ago

Hi @dreazee!

This is interesting. It seems to be showing events that end on the same day as it's being viewed. That's obviously not right. I'm using the API for The Events Calendar to fetch the events, and I wouldn't expect it to work that way. Fortunately, I work in the same company as that crew, so I've reached out to them to see what they think.

In the meantime, I've put in a safety so if someone does try to RSVP to a past even it will show a popup explaining that past events can't be RSVP'd to. Obviously it's best if they don't show up at all, but at least this plugs any confusion.

I could try something that would hide all events that occur on the current day, but that would mean a person couldn't RSVP to something in the morning that is happening that evening. I assume we don't want that?

I'll let you know when I hear back!

dreazee commented 1 year ago

Oh gosh @JasonTheAdams totally don't worry about putting in safeties/quick fixes for stuff like that. It's time we can't afford to waste since we need you on so many other things right now! People have figured it out and they'll continue to figure it out & realize what date it is 😂 until we can get the event to disappear once the event has concluded.

It's very strange because I swear sometimes the event has disappeared the next (maybe, maybe I'm just imagining things??) and sometimes (like yesterday) a past Tuesday event showed up when it was Wednesday. Glad you have the ins with the crew! I'm interested to hear what's up.

And YES, good assumption that we want to keep the event open on the same day! We definitely don't want to hide same-day events.

JasonTheAdams commented 1 year ago

Eh, it didn't take me more than 15 minutes to add a little guard. I was already in that part of the code for the capacity stuff, so it made sense. I'd like to avoid you getting unnecessary emails as you already receive a prestigious amount.

Thanks for the confirmation. I'll keep you posted!

dreazee commented 1 year ago

@JasonTheAdams Did you ever hear back about this? I just saw that a Nov 1 date is showing (it's Nov 2) but on another day the event disappeared at the exact time the event started. So it doesn't seem to be consistent.

JasonTheAdams commented 1 year ago

Hi @dreazee!

Thank you for pinging me about this. I did reach out to my colleagues at The Events Calendar (TEC) and learned, surprisingly, there isn't a way of doing what I'm trying to do on the version of TEC we're using. They did recently come out with a new major version, but it wouldn't be a trivial update. It's one I'd like to do in the next few months (and will greatly improve the calendar view), but not now.

In the meantime, I went about it a completely different way. It's not quite as efficient as if TEC supported it directly, but it will work without any noticeable changes. I'm actually trying to push the changes now but am having problems deploying to WP Engine — I'm currently chatting with their tech support. I'll ping here and close this once this fix is live.

dreazee commented 1 year ago

Thanks @JasonTheAdams !! Appreciate you!!

JasonTheAdams commented 1 year ago

Whew! Ok, I got the issue with WP Engine resolved. That was weird. I just pushed the changes. I'm 90% sure we should be good to go, so I'm going to close this, but please re-open if you find any issues!