Support

Home Forums Event Espresso Premium Emails stuck in que

Emails stuck in que

Posted: September 9, 2020 at 1:12 am

Viewing 24 reply threads


Fakta Kurser

September 9, 2020 at 1:12 am

Until now emails were being sent out just fine when a new customer signs up for a course – to the registrant and to the admin.
Now they stall – and get stuck in que.

What to do now to get them working again?


Tony

  • Support Staff

September 9, 2020 at 3:41 am

Hi there,

Where in the queue are they stuck?

If you install this plugin on this site:

https://en-gb.wordpress.org/plugins/wp-crontrol/

Then go to Tools -> Cron Events.

Search for ‘AHEE__EE_Messages_Scheduler’ on that page, do you have 3 hooked events listed starting with the above string?


Fakta Kurser

September 10, 2020 at 11:12 pm

They are stuck before being generated (and therefore never get to be sent)

I installed the plugin and this is what I have:

AHEE__EE_Cron_Tasks__clean_up_junk_transactions
AHEE_EE_Cron_Tasks__clean_out_old_gateway_logs
AHEE__EE_Messages_Scheduler__cleanup


dee4dogs

September 11, 2020 at 12:07 am

Following.

Sounds like a similar problem to https://eventespresso.com/topic/queued-for-sending/


Tony

  • Support Staff

September 11, 2020 at 2:03 am

Hi D,

It does indeed.


@faktakurser
the message queue crons on your site have been removed so the message queue has no queue to work through right now.

To fix this you’ll need to de-activate and then re-active EE4 (and any add-ons you have active as they’ll likely de-activate when core is). We’ve had this happen on a small number of sites since the message queue was introduced although recently it seems to be on the up, possibly due to WP core updates but I’m just guessing currently. I did some investigating on the thread @dee4dogs referenced and found its likely due to a WP core issue with 5 minute crons like the ones the message system uses just randomly disappearing.

So, if you de-activate then re-activate EE4 and check the cron jobs you should see:

AHEE__EE_Messages_Scheduler__generating
AHEE__EE_Messages_Scheduler__sending
AHEE__EE_Messages_Scheduler__clean_up

In the cron list, then messages should start generating again.


Fakta Kurser

September 11, 2020 at 2:41 am

If I deactivate – then what happens with all the adjustments and customization that have been made in the messages and translations of these?


Tony

  • Support Staff

September 11, 2020 at 2:56 am

Nothing should happen.

Settings are saved to the database and translations are applied on initial activation to the sections that save to the database (meaning that’s already happened and then saved), other translations apply on the fly using the MO file and so will continue to do so.

If you want to be sure, create a database backup before doing the above, that way you can always revert to that backup in the worst-case scenario.


Fakta Kurser

September 11, 2020 at 3:11 am

I did so – and I got the 3 strings you mention.

BUT – I lost all my translations!
Now what – What do I do to restore them?


Fakta Kurser

September 11, 2020 at 3:13 am

And a new enrollment is still stuck in que….. like before de-activate and the re-activate


Tony

  • Support Staff

September 11, 2020 at 3:31 am

Which translations in which location?

And a new enrollment is still stuck in que….. like before de-activate and the re-activate

How do you know it is stuck?

The message queue runs on a cron that has a schedule of 5 minutes, due to how WP_Cron works it needs a front end page on the site to be opened which then triggers the cron check and if any messages are past their ‘scheduled’ time, they run. Meaning the message will sit waiting to generate in the queue until the cron job is triggered, then again waiting to send.


Fakta Kurser

September 11, 2020 at 5:32 am

The messages go out just fine now – thank you.

The translations that are lost are those on the buttons and on the single steps of the order flow.
I tried reloading the po and Mo-files with out any luck.


Tony

  • Support Staff

September 14, 2020 at 4:09 am

Hmm, strange. Those translations wouldn’t be saved by Event Espresso itself so I’m not sure how de-activating EE caused that, my apologies.

Can you send me PO file you are using on the site so I can take a look?


Fakta Kurser

September 14, 2020 at 7:17 am

This reply has been marked as private.


Tony

  • Support Staff

September 14, 2020 at 8:43 am

Either post a link I can use to download it here (host it on the site itself and post a link for example) or send it over to support[at]eventespresso.com and I’ll take a look.


Fakta Kurser

September 14, 2020 at 8:52 am

This reply has been marked as private.


Tony

  • Support Staff

September 14, 2020 at 9:48 am

Thank you.

I’ve found the problem and its due to a typo in the latest release.

The filename event-espresso-4-{locale}.mo is the filename we use for our GlotPress translations and we added a check to load those translations when the ‘proper’ filename couldn’t be found in case users uploaded those directly. The latest release is checking for event_espresso-4-{locale}.mo (note the _ rather than -) but that is incorrect.

We’ll push an update to fix this shortly or if you prefer your can rename your MO/PO file to use the ‘proper’ naming format which is:

event_espresso-{locale}.mo

So yours would be event_espresso-da_DK.mo (and PO).

That will then load your translations again and should fix the buttons.


Fakta Kurser

September 15, 2020 at 12:41 am

This reply has been marked as private.


Tony

  • Support Staff

September 15, 2020 at 2:09 am

You’re most welcome, I’m glad your back up and running.

Any further issues just let us know.


Fakta Kurser

September 16, 2020 at 8:09 am

This reply has been marked as private.


Tony

  • Support Staff

September 16, 2020 at 8:14 am

If you check the cron jobs again using the steps here:

https://eventespresso.com/topic/emails-stuck-in-que/#post-315684

Do you see the 3 jobs?


Fakta Kurser

September 16, 2020 at 8:20 am

This reply has been marked as private.


Tony

  • Support Staff

September 16, 2020 at 12:24 pm

Hmm, so it’s the same issue again but this time you are missing just AHEE__EE_Messages_Scheduler__sending.

You’ll need to da/reactivate EE4 again to fix it again but the good news is that I’m currently working on a patch that will hopefully fix this automatically from now on using an hourly cron and provided nothing comes up during testing of the fix I’ll push the update soon.


Tony

  • Support Staff

September 18, 2020 at 4:43 am

Hi there,

The latest version of Event Espresso 4 (4.10.8.p) includes an additional check for these missing crons which should help with this.

We’ve used the AHEE__EE_Messages_Scheduler__cleanup cron as that job has always still been available when we’ve had reports of this. That cron runs hourly to cleanup old messages and now also checks that AHEE__EE_Messages_Scheduler__generating and AHEE__EE_Messages_Scheduler__sending are both still active, if not it will re-create them.

That means that if you do have missing crons it can take anywhere from an hour onwards (wp_crons rely on users visiting your site for them to ‘fire’) to create them and then they’ll step through the process as normal. Whilst not ideal it’s better than the current situation and the best workaround we can find for what appears to be a random WP core issue.


Fakta Kurser

September 18, 2020 at 4:47 am

This reply has been marked as private.


Tony

  • Support Staff

September 18, 2020 at 5:18 am

Thank you and the same to you 🙂

Side note I’m in the UK so currently BST (UTC+1)

Viewing 24 reply threads

The support post ‘Emails stuck in que’ 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.

Event Espresso