bp_activity_akismet_delete_old_metadata is NOT firing in WP-cron, leading to massive potential DB bloat.
|Reported by:||rossagrant||Owned by:|
Creating a ticket after replicating this issue on 3 separate installs of BP and WP.
It appears that the wp-cron job bp_activity_akismet_delete_old_metadata ISN'T firing on any BP installs.
I can't track back to at which version this began being a problem unfortunately, but it wasn't an issue in BP 1.5 from what I can remember.
Steps to replicate:
- Install BP 1.6.x and WP 3.5
- Now to see which jobs are in cron, you're going to need a backend plugin such as the very stable WP-Cron dashboard - http://wordpress.org/extend/plugins/wp-cron-dashboard/ (not been updated for a while, but works just fine).
- You'll see all of the jobs in cron, but you'll notice that bp_activity_akismet_delete_old_metadata has a big X next to it saying "X - no action exists with this name".
- Now of course, I first thought this could be a plugin not reading the job properly, but after inspecting the DB and the activity_meta entries table, NO daily clear-outs of this table have been made in months.
This cron job should run once daily to empty the meta table which contains all sorts of stuff such as Akismet calls for the activity stream (when the option is checked to use Akismet in the backend.)
However there is an actual error with the Akismet option, which was reported in this thread here:
So even when the Akismet box for BP in the options is UNCHECKED, Akismet is STILL queried for the activity stream.
There is a separate ticket for this issue and it doesn't affect the main issue of the job not firing:
As further proof that the cron job is not firing, the user in that ticket also reports that he has 25k meta entries that IF THIS CRON WAS WORKING would have been cleared out regardless of the Akismet bug.
So we need to find out what has gone wrong with this action and why it isn't firing.
It will have gone unnoticed for ages as unless you check wp-cron with a plugin or look at your DB regularly, you would never have noticed anything odd.
I have replicated this on 3 separate server environments, so I'm confident it's not server related or plugin related as I've tried it on a vanilla install in BP-Default with NO plugins.
If you need me to test anything at all, please shout up! :)
Change History (6)
comment:2 boonebgorges — 14 months ago
- Keywords has-patch needs-testing added
- Milestone changed from Awaiting Review to 1.7