WordPress.org

Ready to get started?Download WordPress

Forums

Post Expirator
Posts expiring on wrong date (6 posts)

  1. rubious
    Member
    Posted 12 months ago #

    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: http://pastebin.com/2LXKTiFs

    Thanks
    Shaun

    http://wordpress.org/plugins/post-expirator/

  2. arielmeadow
    Member
    Posted 11 months ago #

    I am experiencing this same issue with expiration dates that have been changed. I'll have my developer come and link logs if possible.

  3. kellbot
    Member
    Posted 10 months ago #

    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.

  4. kellbot
    Member
    Posted 10 months ago #

    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.

  5. Aaron Axelsen
    Member
    Plugin Author

    Posted 10 months ago #

    I'll see if I can get this fixed - thanks for pointing it out!

  6. rubious
    Member
    Posted 10 months ago #

    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

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.