This is a minor bugfix release. Some of the deprecated wordpress function calls have been cleaned up.
The plugin can be downloaded at the WordPress Plugins Page.
A problem has got me stumped.
Post Expirator isn’t expirating … but if I de-activate the plugin then reactivate it straight away, it expires all of the posts it should have. So I know the right information is there.
The only thing I can think of is something wrong with my cron jobs, but the only other plugin I use which I think relies on that is a backup plugion, which seems to be working fine.
Any suggestions as to where I should look or what I should do? (Already wiped a previous copy of the plugin, and downloaded / reinstalled it again. Thought that had cured it, until I realised it only expirated past posts, not ones which came due for expiration.)
[-: Michael :-]
Similar problems. After over a year of excellent results I get spotty or non-existent expirations. Let me know what I can do to help you track this down. 🙁
Those issues are strange (never heard of that particular circumstance before). Have you tried using the reset cron button on the settings page? I would start there just to make sure they are setup correctly. I may add some code to maybe show what cron jobs are scheduled.
Any other debugging suggestions are welcome.
Sorry for the delay in responding … been waiting for an email to say there’s a new reply here. As I haven’t had one, thought I’d come take a look 🙂
I’ve optimistically tried the reset cron button several times … doesn’t seem to have any effect. Or at least, doesn’t cure the problem or expirate things that should have been expirated. It might be causing some lemming somewhere to get hit with a hammer, but it’s not doing anything I can find out about. 🙁
What versions of things are you running? (WordPress, Plugins, Etc) Are there any other plugins installed?
WP 3.3.2 (though I’m pretty sure the problem was there when I was running 3.3.1) latest version of Post Expirator.
Loads of other plugins – don’t think I’ve tried deactivating them and seeing if that cures the problem. They’re pretty much all the latest versions except one, which I’ve hacked so heavily I’m trying not to upgrade unless / until I have to. Unfortunately some of them lose their settings when I de-activate them, so I have to re-enter, but I’ll try that and see what happens.
Deactivated everything except Post Expirator … didn’t expirate posts that should have been, editted an existing post to a ‘forward’ expiration time … didn’t expirate … created a new post with a future expiration time … didn’t expirate.
Now it’s time to work out which plugins don’t like to be deactivated then reactivated again! 🙂
Oh .. and just to puzzle you more … just deactivated then reactivated Post Expirator … and it expirated the posts it should have … does WordPress have a “puzzled face” smiley?
For various reasons, I’m completely rebuilding my website. Installed Post Expirator early on, and it SEEMS to work fine … so it’s likely it’s either something I’ve done or there’s a conflict with another plugin that didn’t show up before!
Just thought I’d let you know so you didn’t invest time in thinking about it! 🙂 At least, not yet!! 😀
Thought I should update this, both for your sake Aaron and in case anyone comes looing for answers to a similar problem.
The problem APPEARS to be in the quantity of plugins I was running, not in any one in particular. Kind of strange that they all do what they’re supposed to, and when they’re supposed to but deactivating some of them seems to get Post Expirator working as it should again.
The problem is a bit harder to find because Post Expirator APPEARS to need to be deactivated then activated again, once it has stopped working. So you can’t just disable plugins one at a time to see when it starts working.
Seems strange … but it works for some reason, and Post Expirator is far more important to me than the plugins I’ll do without or find other methods for! 🙂
My guess is that the wp-cron process may be timing out. Pending what all the plugins are that you have enabled and if they are also using cron, it may be possible that something is causing it to exceed the max execution time, which would result in posts not expiring.
Another thing you could try is increase the php max execution time on your server to see if that would solve the problem
Hello. I have a question. I want to use a caching plugin for my WordPress site which is also running your Post Expirator plugin. Do you have a recommendation for a caching plugin that works with your Post Expirator?
Are there specific issues you are running into with a caching plugin?
I was using WP Super Cache, but after the Post Expirator ran and deleted expired posts, it didn’t recache any pages so it looked like the expired posts were still there. I might not have set the caching plugin to recache when posts are deleted but I couldn’t find any such setting, so I wanted to know if there is any caching plugin that will recache after Post Expirator deletes posts.
I have not had a chance to try this, but you could try calling wp_cache_post_change( $post_id ) in the expire function to see if that solves your problem This would then cause the post cache to be cleared whenever something is expired.
Sorry, another question. I would like it if Post Expirator ran once a day instead of once per minute. What do I change in your code so I can have it run once a day? Thanks.
Just curious, but what is the logic/reasoning behind having it only run once daily? The easiest way would just be to adjust your expiration times to be the same time, and then just adjust the date as needed.
From my understanding, Post-Expirator is scheduled in wp-cron to run once a minute to see if any posts need to be deleted. I don’t want it to query the database every minute to see if there are any expired posts. I only want it to check once a day (say, at 11PM) and delete any expired posts. I don’t need expiration dates to be up to the minute specific, just up to the day. I’m sorry if I am misunderstanding how the plugin works. I’m kind of new to WordPress.
you would have to change the activation functions, then deactivate and reactivate.
The function you would need to change is the call too wp_schedule_event
Thank you for your responses. I found out my caching plugin wasn’t refreshing the cache properly. Now it works. Also, I made the change you suggested and now the expirator is running once a day. Thank you again, and good work with the plugin.
HI, I am using this plugin with WP User Frontend, and when I enable it in WP User Frontend, the submission form directs people to enter the expiration date but only gives up to 72 hours. Is this an issue with Post Expirator or WPUF and where would I look to troubleshoot
can you provide a screen shot of what you’re seeing? i’ve never used those to plugins together
WP User Front End is the plugin I’ve ‘hacked heavily’. It’s ‘key’ to my site and Post Expirator, and how the two work together, is pretty fundamental too. I’ve therefore been looking at both plugins in quite a bit of depth recently. I wasn’t aware of a seventy two hour limit, but I’m using the Post Expirator plugin slightly differently than working from a straight forward post date.
The Post Expirator ‘link’ is handled by “/wp user front end/extra/custom_hooks.php”. If you want to see what it’s doing / change it, there’s the place to start looking.
Hope this helps a bit 🙂
I am using your excellent plugin, but it has stopped working for some posts. I think there is a conflict with another plugin, the WP Favorites, (http://nxsn.com/my-projects/wp-favorite-posts-plugin/), and when this plugin is enabled posts do not expire that are in the WP Favorites list. Any ideas why this is happening?
Kind regards, Joe
Your email address will not be published. Required fields are marked *