Skip Navigation

[Resolved] Email notifications not being sent for expiring posts

This thread is resolved. Here is a description of the problem and solution.

Problem:

The "cred_post_expiration_event" Cron Event is missing after migrate website.

Solution:

You can try these:

https://toolset.com/forums/topic/email-notifications-not-being-sent-for-expiring-posts/#post-1932881

Relevant Documentation:

This support ticket is created 4 years ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Hong_Kong (GMT+08:00)

Tagged: 

This topic contains 8 replies, has 2 voices.

Last updated by simonM-5 3 years, 12 months ago.

Assisted by: Luo Yang.

Author
Posts
#1931163

Hi Support

We recently moved from a .com to a .de domain and most things transitioned very smoothly.

We have noticed however that Toolset Forms is no longer sending out notification emails for expiring posts.

We had a previous support request with Jamal on our old .com domain, where there was a problem that the notifications were not being sent at the correct time due to the time zone offset, but since we moved to .de they are not being sent out at all.

It is affecting Post Types Job Ads and Nanny Ads.

It may also be worth noting that after the migration of the site (done with our Duplicator Pro plugin), Forms didn't migrate 100% correctly (all the Form Settings were lost and sent back to vanilla settings) and there were some issues with Toolset Access, however I fixed those by setting the options as we needed and reviewing Toolset Access to set it as we required.

I reviewed Toolset > Settings > Other > Post expiration and checked that Post expiration was enabled.. It is currently set to check every 5 minutes.

Also, Toolset > Settings > Export > Export also settings when exporting Forms was also set, so I don't understand why the Forms got corrupted when duplicating the site.

I have also tried sending a test notification and it works fine too.

We'd appreciate your support in getting the notifications working again, and getting them to be sent at the correct times.

Oh, and by the way, when creating a new support ticket, the information stated is incorrect:
"Hi simonM-5,
In the last 30 days you created 4 support tickets. Support spent about 2 hours and 40 minutes working on them."

In the last 30 days I haven't opened a single ticket.... 😉

Thanks and regards
Simon

#1932863

Hello,

Thanks for the details, I am checking it in your website, will update here if find anything

#1932881

Toolset Forms expiration feature is based on WordPress CRON job, but in your website, the "cred_post_expiration_event cron" Cron Event is missing, it might be a problem of broken data when you migrate the website.

I have done below modifications in your website:
1) Install the "WP Crontrol" plugin
https://wordpress.org/plugins/wp-crontrol/
2) Dashboard-> Tools -> Cron Events-> Cron Events
hidden link
Search with keyword "cred_post_expiration_event", there isn't any result
3) So you need to reset the Toolset form CRON job event
Dashboard-> Toolset-> Settings-> Forms
hidden link
in section "Post expiration", disable option "Enable the ability to set an automatic expiration date for posts created or edited with a form".
Enable above option again, choose option "Once Hourly".
refresh page of step 2), I can see the CRON event now.

See the email logs here:
hidden link

I can see those expiration email logs.

Please check if it is fixed, and you can remove "WP Crontrol" plugin anytime, it is just for debug purpose, thanks

#1934829
Screenshot 2021-02-05 at 10.19.11.png
Screenshot 2021-02-05 at 10.16.18.png
Screenshot 2021-02-05 at 10.15.06.png

Hi Luo

Thank you for the your useful answer - that plugin revealed a bug with the selection list for the interval, I believe.

The list of available time intervals seems to be shared between all plugins. Could I be right? For example, "5 minutes" appears twice in the list. If I choose either of the "5 minutes" options, I cannot see the cron job using the plugin WP Crontrol, or it appears very briefly then disappears from the list - I think this is what happened based on my screenshots I'm sending you. Setting 10 minutes, it appears to keep the cron job permanently in the list.

I suspect the two 5 minute options come from WooCommerce plugins based on their name, but cannot confirm that easily. Can you confirm my suspicions? If so what are the time settings which are "native" to the Toolset plugin from the entire list?

You can understand why we need to set it to short intervals for testing. It is very annoying if we have to wait an hour every time we want to test if the expiration posts are getting fired on time.

We will continue to test using the 10 minute setting, to check whether we still have the timezone offset problem in the meantime.

Thanks and best regards
Simon

#1934867
5-minutes.JPG

Yes, I can confirm the "5 minutes" interval is from Woocommerce plugin.

For the problem:
If I choose either of the "5 minutes" options, I cannot see the cron job using the plugin WP Crontrol, or it appears very briefly then disappears from the list

I have tried it in my localhost with a fresh WP installation + the latest Toolset plugins + Woocommerce plugin, I can set cred_post_expiration_event event as "5 minutes" interval without any problem, see my screenshot 5-minutes.JPG

So there might be other compatibility issues in your website, please check the compatibility issue in your website:
deactivate all other plugins, and switch to wordpress default theme 2021, deactivate all custom PHP/JS code snippets, and test again

#1934985

Hi Luo

I saw that also briefly, as you can see by my previous screenshots, but at some point it got "cleaned up" and was no longer available after I clicked on it (my Edit Cron Event screenshot).

In any case I don't want to use 5 minutes if it comes from another plugin, otherwise I would be creating an unnecessary dependency between the plugins. For testing purposes, 10 minutes setting is fine. I have created a few more posts which are set to expire in an hour, so I should be able to let you know if the time zone offset is working or not shortly.

In your localhost, if you deactivate the Woo stuff, which interval options does Toolset Forms offer natively?

Thanks and regards
Simon

#1935163

Hi Luo

So I've been some more testing - the reminders don't seem to be obeying the timezone set.

As a test example:
I set Post Form - New Nanny Ad to expire 30 mins after creation, and send a reminder 20 minutes before expiration, (so in other words 10 minutes after creation timestamp). Even allowing for the fact that the cron job runs only every 10 minutes, I am still not getting the reminder within 30 minutes of the creation timestamp, so I suspect that the Toolset plugin is not adhering to the correct timezone.

Kind regards
Simon

New threads created by Luo Yang and linked to this one are listed below:

https://toolset.com/forums/topic/i-suspect-that-the-toolset-plugin-is-not-adhering-to-the-correct-timezone/

#1937429

Q1) In your localhost, if you deactivate the Woo stuff, which interval options does Toolset Forms offer natively?
Toolset Forms plugin does not provide "5 minutes" interval, as I mentioned above it is from Woocommerce plugin

For other new timezone questions, please check the new thread here:
https://toolset.com/forums/topic/i-suspect-that-the-toolset-plugin-is-not-adhering-to-the-correct-timezone/

#1941151

My issue is resolved now. Thank you!