Disciple.Tools Community D.T Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Disicple.Tools
    • Register
    • Login

    Using Facebook Plugin, comments are being repeated in the Comments and Activity Tile.

    Scheduled Pinned Locked Moved Facebook
    answered
    9 Posts 3 Posters 456 Views 2 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • jaichele70J Offline
      jaichele70
      last edited by

      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?
      Screenshot 2024-08-05 at 10.25.31 AM.png

      CorsacC 1 Reply Last reply Reply Quote 0
      • CorsacC Offline
        Corsac @jaichele70
        last edited by

        @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?

        jaichele70J 1 Reply Last reply Reply Quote 0
        • jaichele70J Offline
          jaichele70 @Corsac
          last edited by

          @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.

          1 Reply Last reply Reply Quote 0
          • CorsacC Corsac moved this topic from General Discussion on
          • CorsacC Offline
            Corsac
            last edited by

            Awesome. Thanks @jaichele70!

            jaichele70J 1 Reply Last reply Reply Quote 0
            • jaichele70J Offline
              jaichele70 @Corsac
              last edited by

              @Corsac Unfortunately, we are having the repeating comments issue again.

              Any ideas?
              Here is a sample contact: https://rs.dteurohive.com/contacts/12269/

              CorsacC 1 Reply Last reply Reply Quote 0
              • CorsacC Offline
                Corsac @jaichele70
                last edited by Corsac

                @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.

                1 Reply Last reply Reply Quote 0
                • P Offline
                  PetrV-Online
                  last edited by

                  @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?

                  CorsacC 1 Reply Last reply Reply Quote 0
                  • CorsacC Offline
                    Corsac @PetrV-Online
                    last edited by

                    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.

                    1 Reply Last reply Reply Quote 0
                    • CorsacC Offline
                      Corsac
                      last edited by

                      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;
                      
                      1 Reply Last reply Reply Quote 0
                      • First post
                        Last post