I have a BuddyPress installation with many custom code.
I had everything ready for production until I moved my database to shared hosting.
The problem is that in strange ocasions, all the activities in
wp_bp_activity gets deleted.
I'm not saying that this problem ocured because I moved my database, but I cant reproduce this bug with my original installation (but had the same problem when I compied hosting database to new installation on my local machine)
1) I don't beliave this
DELETE is triggered with buddypress native code because everything staies as is in
2) I can't reproduce this bug and I can't understand when this happens. Also this does not happen often. maybe once or twice a day (or even once in two days). this is why it drives me crazy )
3) The most interesting, it deletes EVERYTHING except "like". I'm using bp-like-unlike compontent. It deletes everything: avatar_change, comments, activity, my own components but not bp-like which is just a copy of original (liked).
UPDATE: As @S_HA_DUM suggested I turned
SQL debbuging on and found (in 500mb data) this request (no error from php side)
DELETE FROM wp_bp_activity WHERE item_id = 0
the only thing I found that queries to
delete function (someone named it this simple :D) in buddypress plugin.
but still can't find where this function is triggered
I want some suggestions how to debug this error. Any help is welcomed