Posted: February 10, 2023 at 2:51 pm
Hello, I set an automated post-event notification for an event, and it went haywire. It sent the post-event messages 3x a day for 3 days. Customers were understandably annoyed. Is there something I can check/change to ensure this doesn’t happen again? It was set to send a notification 1 day after the event. Thanks in advance. |
|
Hi there, Do you have records in the Event Espresso > Messages > Activity that shows that multiple messages were sent? Or how do you know those messages were repeated? I’ve not seen that happen and in order to prevent that from happening we’ll need to try and see if you can replicate it. Can you create an event, add your self as an attendee, then set up that same notification for just you in that one event? Hopefully you can trigger that to happen to just you. If it happens again I’d look at WordPress Cron and the cron schedule to make sure it’s running correctly. Your host can probably help with that. If the situation doesn’t happen again, then it will require more testing. |
|
Hi, I have created a new test event and registered myself to see if this happens again. The post event notification will trigger starting tomorrow, so we’ll see what happens. Just a note – we’ve been using the pre-event for months with no problem. We’ve just added the post-event add-on. |
|
Hi there, Just to confirm, are you using the Post Event or Post Datetime notifications? It sounds like you are using post event but I just wanted to confirm first. |
|
Yes, you are correct, it is a Post Event notification. |
|
Ok, two days have passed and I haven’t received a post-event notification at all this time. And I used the same template. I actually duplicated the problematic event. Only difference is that I made it private so it wouldn’t display with the other events our visitors saw on the main page and calendar. |
|
By the way, the Not Approved, Approved and Upcoming Event Automated messages all work just fine. |
|
It actually will do, the query for AUEN is looking specifically for events with a status of I’ve managed to reproduce this and currently working on a fix but I can tell you how to test the above yourself if you’d like. Install WP Crontrol on the site: https://wordpress.org/plugins/wp-crontrol/ Open up Tools -> Cron Events and look for ‘AHEE__EventEspresso_AutomatedEventNotifications_core_tasks_Scheduler__check’ Leave that open in that tab. In a new tab open up Event Espresso -> Messages, take note of the last message triggered. Click Run now on the above cron task, then refresh messages, there should NOT be a AUEN message triggered. Edit your event and set it to be published publicly. Now repeat the above and run the cron task… take a look in messages, it SHOULD trigger a message. Run the cron task again…. it should NOT trigger a message, but in this case it will. Each time the cron task runs it will trigger a new message to send. Normally there is a meta value set to exclude specific events/datetimes and it looks like that may be missing here. I’m investigating this further and will post any info found. |
|
Ok, before I make a lot of people mad – there are multiple events scheduled on my system… If I click “run” on the cron task, will it send messages to everyone? |
|
Only if those people are due to get a message anyway. That cron automatically runs in the background roughly every 3 hours anyway, the run now button just lets you run it on your own. But, I’ve found the problem and will be pushing an update for it on Monday (we don’t push updates on Friday as support may not be available over the weekend). If you are comfortable with FTP/File Manager on the server I can tell you what you need to change:
On line 282 should be something like:
Change the That should fix the issue for you. You can confirm that by doing the above using your test event first, then as soon as you change the above the email should stop being triggered when you click the Run now button again. |
|
Ok, I’ll make that change today. Over the weekend I received 5 notifications for the event I enabled Post notifications on. I’ll change this, and retest. |
|
So what’s happening is the query that’s looking for events that have already been processed for the POST notification has the wrong condition, it’s looking for events with an Event End in the future. Theres basically 2 queries that run. Query 1 – get all the events that match the schedule criteria. Query 2 – get the events that match the criteria that have already been processed and exclude them from the above. Query 2 is missing the events that match the current conditions and have already been processed, so each time the POST notifications run they pull all the events in that match and the current ones that have been processed aren’t excluded, that’s why you get multiples. Each time the cron runs throughout the day where the criteria matches up it triggers another email. I’ll be pushing an update for the add-on with that change out today. |
|
Ok, thanks for the explanation. I just edited the file the way you specified. But to be sure, I’ll likely apply your update. |
|
The update has been pushed live. If you don’t see it on your site just yet go to Event Espresso -> General Settings. Make no changes and just hit save for an update check. |
|
I seem to have only received one Post-Event notification. Thanks! |
|
Awesome, thanks for keeping us updated, I’m glad it worked. Any further issues please let us know 🙂 |
|
The support post ‘Automated Post Event Notification’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.