Support » Plugin: Post Expiration Date » Posts go Draft as soon as I apply the expiration

  • Resolved lordneeko

    (@lordneeko)


    I wanted to ask a question here before uninstalling.
    I keep trying to add an expiration to my posts, but as soon as I select the date/time, and click update, the post goes Draft. No matter what I put in. These are not custom post types. Maybe i’m doing it wrong?

    WordPress 4.9.9
    PHP 5.6.26

Viewing 6 replies - 1 through 6 (of 6 total)
  • To be more specific. If I set the date way in the future it works….but if I set the expiration to later today or tomorrow, it goes Draft right away

    also, after adding the expiration date/time it disappears from the box so you can’t tell whether it was applied or not

    Plugin Author Huguette Inc

    (@huguetteinc)

    My guess is that your server is not at UTC time, and rather at local time. When you put the expiration date in place it runs a check to see if the input time is in the past and keeps draft status if it is.

    Because you are setting the expiry few minutes to a few hours ahead — but less then the time offset from your server time — the plugin sees the time as being in the past.

    Sorry for the confusion. I realize this limits the usefulness of the plugin for some people and will be addressing it in future updates. It works well for our needs and is much simpler (though clearly less robust) then other methods.

    When I look in my Wp-admin general->settings it displays UTC time…and it is correct.

    Also didn’t respond as to why the expiration field is blank after I submit the change

    Plugin Author Huguette Inc

    (@huguetteinc)

    re time: That’s your WP time. The plugin uses your actual server’s time.

    Expiration field is blank after the submitted change because the expiration date was before now(). When that happens the expiration action is considered to have been done and it’s removed from your postmeta. The plugin does not keep a log of expirations that have occurred.

    Ok I see. Is there a chance in the next update that you can change in the post expiration settings more options for time displays? I just discovered my server uses MST, but my WP time is set to EST, so using the Native option doesn’t work for me. Any chance you could add all time zones, or maybe just a +/- hours field for customizing just the displayed value?
    I can convert time zones, but the customer I’m working for won’t be able to get that right, and won’t be user friendly from his POV.

    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Posts go Draft as soon as I apply the expiration’ is closed to new replies.