strangerstudios / pmpro-events

Offer members-only events using popular events plugins and Paid Memberships Pro.
https://www.paidmembershipspro.com/add-ons/events-for-members-only/
8 stars 10 forks source link

Updating membership level in a recurring event does not update all events #44

Closed jasonful closed 1 year ago

jasonful commented 2 years ago

Our site has gotten into a state where some (but not all) recurring events have the property where the older events have membership levels, and the newer events (incorrectly) do not have membership levels. Editing the series will only affect the older events; there is no way to add membership levels to the newer events. I'm sorry I don't have exact repro steps -- I don't know how we got into this state. I can give you access to a staging site if you'd like. Or if you can point me to the code that updates all the events of a recurring event, I could look into it. We are using The Events Calendar and The Events Calendar Pro. All plugins are updated to the latest version.

jasonful commented 2 years ago

As a workaround, I've tried bringing in the end date, then re-extending it into the future, so that the future events get recreated. This workaround often works, but not always: Sometimes the most future events do not get membership levels.

jasonful commented 1 year ago

The workaround no longer seems to work.

jasonful commented 1 year ago

Symptoms are slightly different now. All events in a broken series are accessible to non-signed in users. In the back-end, they appear to require membership (according to the "Requires Membership" column), but if you edit the event, the "Require Membership" panel on the right has all of its checkboxes (for all the levels) unchecked. And a non-signed in user can see the full (not excerpted) event. Rechecking the checkboxes and updating the event does not fix the bug.

jasonful commented 1 year ago

I wonder if this is due to the recent update to The Events Calendar. (See https://theeventscalendar.com/blog/news/introducing-the-events-calendar-6-0) They updated how they handle recurring events.

jasonful commented 1 year ago

Simply creating a new recurring event, and checking some of the membership level checkboxes, will repro this bug (in the sense that the event will be accessible to non-signed in users).

andrewlimaza commented 1 year ago

Thanks for bringing this to our attention @jasonful, it does sound like there was a major change to The Events Calendar 6.0 and we may need to cater for this change.

andrewlimaza commented 1 year ago

@jasonful to confirm this was working 100% of the time in The Events Calendar V5?

jasonful commented 1 year ago

There were problems in v5, also, though the symptoms were somewhat different. My original comment from Feb 13 was about V5.

andrewlimaza commented 1 year ago

@jasonful here is a draft PR (that still needs to be tested) to support recurring events - https://github.com/strangerstudios/pmpro-events/pull/48

It works to look at the "parent event" require membership settings and references that for all recurring events. Please test this on a staging site first.