Skip Navigation

[Resolved] Post Status isn't changing

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)

This topic contains 4 replies, has 2 voices.

Last updated by neilR 1 year, 7 months ago.

Assisted by: Luo Yang.

Author
Posts
#2609949

For info, screenshots attached show expiration settings in Toolset > Settings > Forms, and an example post whose expiration was set via a form submission - expiration in the past, but Post Status isn't changing to 'Trash'.

#2610375
2023-05-26_09-51-41.jpg

Hi Luo,
I've done a little experimentation, and it looks to me like something is messing up the Toolset settings.
I have checked the Forms Settings for post expiration check on another site, and they show options of 'Once Hourly', 'Once Daily', 'Twice Daily', 'Once Weekly'. When I look at the site with the problem, it looks like the attached.
I am concerned that there may be a variable name duplication with another plugin, or some such, causing invalid options to appear?

I have selected one of the options that matches the Toolset ones, and we'll see if that causes an expiration to occur - just need to wait an hour to see if that works. But if there is a variable duplication, it would be worth making that unique at some point in the dev cycle...

#2610399

Thanks for the update.

Toolset Forms plugin is using WordPress function wp_schedule_event() to register Cron jobs:
https://developer.wordpress.org/reference/functions/wp_schedule_event/

WordPress supports only four kind of recurrence by default:
- hourly
- twicedaily
- daily
- weekly

It seems other plugins/theme if your website causing invalid options to appear.
Please update here if you still need assistance for it.

#2610403

Hi Luo,
Just to reassure you, when I chose one of the four standard options (I chose 'Once Hourly'), the post expired correctly and the status changed. As you say, clearly another plugin is registering options in this array which show up in the settings dropdown but aren't valid options for triggering the Toolset cron job.

#2610405

My issue is resolved now. Thank you!