Skip Navigation

[Resolved] Custom Post Expiration Time: Saves Incorrect Time

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.

Tagged: 

This topic contains 13 replies, has 3 voices.

Last updated by Luo Yang 8 months, 2 weeks ago.

Assigned support staff: Luo Yang.

Author
Posts
#509621

I have post expiry activated but the time saved is 2 hours later than the time I selected. So, for example, if I set the expiry date to 6th Apr 2017 and the expiry time to 01:00, the expiry saved is 06/04/17 at 02:00.

In addition to this, if the value of a custom field in the post is then amended, a further 2 hours is added to the expiry time.

Further to this, if a post with an expiry set is sent to the Bin before the expiry date, the expiry function is still applied to it. This means that my post with post status after expiry set to Pending, is resurrected from the Bin with a status of Pending. I assume the same thing would happen regardless of the post expiry status set but I haven't tested any other statuses.

I'm happy to split this ticket into 3 separate ones; just let me know please.

If you'd like access to test these issues, please enable private box.

Thanks

#509681

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Dear Julie,

It is better that you can separate one question in different thread, that will help other users to find the answer.

For the first question, The CRED form is using UNIX time-stamp to store the expiration time, so there should not be any time zone problem.

But CRED form is using wordpress CRON job to setup the post expiration, so there might be some delay to trigger the CRON job, for example, you are using option "Check for expired content:
once Hourly", the post expiration time 6th Apr 2017 01:00, so the CRON job will be triggered when 06/04/17 at 02:00, and change the post status to "Pending".

#509747

I've created two new tickets for the other issues. I listed them here as they all relate to post expiration and the pattern may have been important.

You've misunderstood the issue regarding the expiration time. I'm not saying the post doesn't expire when it should, I'm saying that when I set the expiry time for the post, it is saved as that time plus 2 hours; if I set it at 04:00, it will save as 06:00.

#510077

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

I can not duplicate same problem, please check these in your website:
1) You are using the latest version of CRED plugin
2) You are follow our document to setup the CRED form and expiration settings
https://toolset.com/documentation/user-guides/automatic-post-expiration/
section "Using Automatic Expiration on CRED forms",
Screenshot:
hidden link
you can enable automatic expiration for a form and set the expiration time. The expiration time can be set in minutes, hours, days or weeks.

3) Deactivate other plugins and switch to wordpress default theme, and test again.

4) If the problem still exists, please provide database dump file of your website, also point out the problem page URL and CRED form URL, I need to test and debug it in my localhost

#510094

I've checked I've set up correctly. There are no other plugins activated, the rest are all up to date. I activated default wordpress theme and created a new post (in the backend). The same thing happens.

I have a dump of my database - please provide private box.

Thanks

#510159

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

I just enabled the "private detail box", please provide a downloadable URL for the database dump file, also point out the problem page URL and CRED form URL, I need to test and debug it in my localhost

#510542

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Thanks for the details, I am downloading the file, will feedback if there is anything found

#510605

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

expiration.JPG

I just test it in your website, create a post with the CRED form in front-end:
hidden link
see screenshot: expiration.JPG
There is a little difference from what you mentioned above:
a further 2 hours is added to the expiry time.

I assume we are talking about this problem:
The post published time is "7 Apr 2017 @ 08:10", and the expiration time is "April 09, 2017 09:00", I assume, but you expect the expiration time is "April 09, 2017 08:10", there are 50 minutes between them, can you confirm it?

#511189

Hi

Yes, this is the problem I'm talking about. There are actually two scenarios where this occurs:-

1. When a post is created and the automatic expiry box is checked (which is what you did)

2. When a post is created, the automatic expiry box is checked AND the expiry time (and/or date) is entered manually prior to publishing (which is what I've been doing).

Personally I believe this is linked to the other issue I raised about the time changing when a custom field is amended (this has been escalated by Noman on a different ticket).

#511380

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Thanks for the details, I assume we are talking about this thread:
https://toolset.com/forums/topic/cred-post-expiration-expiration-time-changes-when-custom-post-field-is-amended/

It seems to be linked to this thread, I added this thread into our to-do list, hope it will raise the attention of our developers.

#524220

Hi,

I'm posting here to notify you that this issue will be fixed in the next release.

Please wait and we will notify you once we launch this release.

Thanks.

#524527

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

Here is the feedback from our 2nd tier supporters: this issue will be fixed in the next release: CRED 1.9, it is under QA status and will be released soon, I suggest you subscribe to our blog to get the updated news:
https://toolset.com/blog/

#525583

Thank you for the updates - much appreciated

#1723591

Luo Yang
Supporter

Languages: English (English ) Chinese (Simplified) (简体中文 )

Timezone: Asia/Hong_Kong (GMT+08:00)

As your request, I have marked this ticket as resolved.