XF 1.5 User complaining about losing likes, how do I diagnose?

iaresee

Active member
I've got a user on my forum who is seeing a slight, but steady decrease in his like count. I ran a quick test and liked a post of his and his counter did indeed go up, but 15 minutes later the like counter was decreased by one.

The site is low traffic so I seriously doubt someone removed an existing like from a post of his. And there were no moderator actions taken in that window that might have removed a user and their posts that would have caused the counter to decrease by one.

How do I diagnose this? The logs visible in the admin UI don't give me much to go on. Is there a log on disk I can grep through that might indicate when a like counter increment or decrement action is taken for a specific user?
 
liked_content shows 7972 rows for the user complaining and their like counter is at 7937 currently. I'm assuming the rows in the liked_content table don't match the counter on the user profile because actions were triggered that decremented the counter but didn't delete a row out of that table. Correct?

Do actions that decrement the counter on the user table log to any place?

Code:
mysql> select user_id, username, like_count from xf_user where username = 'foo';
+---------+----------+------------+
| user_id | username | like_count |
+---------+----------+------------+
|   12084 | foo      |       7937 |
+---------+----------+------------+
1 row in set (0.00 sec)

mysql> select count(*) from xf_liked_content where content_user_id = 12084;
+----------+
| count(*) |
+----------+
|     7972 |
+----------+
1 row in set (0.00 sec)
 
On further investigation I'm seeing this across many users. There's a day-over-day net loss of likes despite no moderation action being taken on threads or users in that time period.

Not sure what to say about this. What background process trues up the like_count on the user table? I think I need to instrument that to debug.

I'm even seeing it on my account. Left the day, yesterday, with 9409 and lost 4 likes in the last 20h with no way to explain why. Counts on rows in liked_content for my username is the same yesterday and today.
 
Top Bottom