-
Hello,
One of our users reported that they are seeing comments repeated 3 and 4 times in the Comments and Activity Tile.
I'll share a screenshot.Any ideas?
-
@jaichele70 Would you be able to confirm if the instance has a server cron job set up and if the default wordpress cron has been disabled?
-
@Corsac It looks like it's all taken care of. I added a cron job for every 5 minutes for each of the subsites. Testing 3 of them show that they are now working so sync with Facebook is back on.
-
C Corsac moved this topic from General Discussion on
-
Awesome. Thanks @jaichele70!
-
@Corsac Unfortunately, we are having the repeating comments issue again.
Any ideas?
Here is a sample contact: https://rs.dteurohive.com/contacts/12269/ -
@jaichele70 Please try disabling
Redis Object Cache and then monitor if the issue continues to happen.
D.T does not play well with object caching. You'll want to disable this on the server side and then also disable the plugin in wordpress. -
@Corsac , @jaichele70 I disabled Redis chace on the server. Sorry I didn't know that it doesn't play well and in most cases that I managed it does help with performace, especially with more bloated sites.
Do we need to do something more to clear duplicate comments or will cronjobs take care of it eventually?
-
Thanks @PetrV-Online!
The Facebook sync tool uses the wp_options table to store the current progress of the sync. If the values are cached, then it will continue trying to sync the some pages again instead of seen that it has already been done.
I'm guessing this is what is happening.We've attempted to write a warning around object caching, but haven't been able to reliably detect if it is enabled or not: https://github.com/DiscipleTools/disciple-tools-theme/issues/2313
There isn't anything in place to remove existing duplicate comments.
There is a function to find and remove duplicate contacts created from Facebook, that could probably be copied and made to work for comments. -
Here is some quick code that can be run on the database to remove the duplicates:
@todo replace wp_16 with the correct prefix
DELETE c1 FROM wp_16_comments c1 JOIN wp_16_comments c2 ON c1.comment_post_ID = c2.comment_post_ID AND c1.comment_content = c2.comment_content AND c1.comment_ID > c2.comment_ID;