• Hi there,

    We have used your plugin happily on a client’s website for a long time, but recently there was a problem.

    Dozens of posts were set to expire last month, but we went in and edited them to change the expiration date to a future date. When the date they were originally set to expire came along, around 3 quarters of the posts we changed did actually expire, even though when editing the post it still shows the future expiration date.

    So even though the post expiration date has been saved, it still expired on the original date.

    Do you have any idea what could be causing this? Here is a link to the logs: https://pastebin.com/2LXKTiFs

    Thanks
    Shaun

    https://www.ads-software.com/plugins/post-expirator/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I am experiencing this same issue with expiration dates that have been changed. I’ll have my developer come and link logs if possible.

    Some more background on this problem: looking at the Cron schedule there are two expiration events: one set for a year after the publication date, and also the correct one. We don’t have any default date set in the Post Expirator settings.

    The edit post page shows the correct date.
    If I update or change the expiration date, the date which was correct before will change, but the first incorrect date still persists. It’s like it isn’t clearing all of them out or something.

    I figured out why this is happening:

    We’ve been using Post Expirator for a long time. We used to expire our posts a year from creation, but then switched to expiring all of them at the end of the month.

    It looks like at some point, the arguments stored in wp cron changed from being stored as a string to an integer. So the post ID argument went from being “1776” to just 1776. WordPress apparently considers these two different values, and as a result wasn’t deleting the old cron item when we updated our expiration dates.

    It would be great if the plugin could be updated to double check for the older style entries when updating, just so those get cleared too. Meanwhile I’m hand cleaning the cron tasks of errant items.

    I’ll see if I can get this fixed – thanks for pointing it out!

    Thread Starter Shaun Robinson

    (@rubious)

    It would be great if you could update the plugin to fix all the errant cron jobs, I am also having a problem where posts are not expiring when they should; we had lots of expire at the end of last month and they did not.

    Is it something to do with the mixture of strings and integers stored in the cron jobs? Here’s a quick screenshot from WP Crontrol: https://files.app.net/pcs1D-1o.png

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Posts expiring on wrong date’ is closed to new replies.