Ok, so this is a tough one, I have had the issue for along time and only just about figured out how to express what the issue is so I can show it to you!
Some of my posts will show 3 reactions from one person. For example, the thumbs up will show liked by:
you, macky, macky and 20 others. So it has been liked 3 times by the same user. This happens for multiple users, not just me.
I have looked into the reactions table and it shows some posts have 3 reactions in the table too. you will see form the attached image that the user 167, has like post #4, 3 times, post 5, 3 times, post 7, 3times, post 15, 3 times and post 17, 3 times. Plus many others
You can also see that in the name and email columns, it says null.
The top line, which is post 1, is normal, but that was tripled up too. I went to post 1 on the forum, unliked it, and reliked it again, and that fixed the issue, but I cant do that to all the posts, and I cant do that for all the users. So I need some way that can fix this issue across the whole table.
It is a very complex issue I find. I have no idea how it happened, or when but it has been problem on my site for along time.
So a few questions....
- How can I fix this?
- Is this happening on anyone else's forum?
- What could have been the cause of this?
As I said, this is a complex issue, I have no idea how I can fix this, I hope someone here can help me figure it out.
Thanks in advance
Hi,
This issue may occur only if there have been modifications made to the database.
If you'd like the developers to investigate and resolve the issue, please send the admin login details along with database access credentials to info[at]gvectors.com.
This was solved by running this in php my admin just incase anyone else has the problem : )
WITH CTE AS (
SELECT
reactionid,
postid,
userid,
ROW_NUMBER() OVER (PARTITION BY postid, userid ORDER BY reactionid) AS row_num
FROM `Insert wpforo reactions table name`
)
DELETE FROM `Insert wpforo reactions table name`
WHERE reactionid IN (
SELECT reactionid
FROM CTE
WHERE row_num > 1
);