Resynchronization of comments

Discussion in '[bd] API' started by def, Dec 7, 2014.

  1. def

    def New Member

    Hello

    Yesterday we had quite heated discussion on my website blog (WP) and forum (XF). At some point by mistake i disabled comments on my Wordpress by "Disable Comments" feature. When i realized my mistake i open them up as quick as possible but still, comments didn`t want to synchronize. So today at Wordpress i have 42 comments and on my Xenforo post i have around 800 comments.

    Is it possible to resynchronize them manually again somehow so they will appear on Wordpress page?

    Thanks!
     
  2. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    That would be tricky. Let say the comments and posts are synced up to 40 comments and you disabled it and when you enabled it again, only the last 2 comments were synced. You can try deleting the #41 and #42 and wait for the cron to run (or trigger it in the options page).
     
    1. def

      def New Member

      #4 def, Dec 8, 2014
      Last edited: Dec 8, 2014
      def @xfrocks I think our case is different. The issue is not that we lost some comments, and there is one newer (made via wordpress or xenoforo) than the lost ones. Our case is that even new comments from xenforo are not added anymore to wordpress.

      Are you suggesting that we can safely delete all the comments on wp in that thread, and then the comments will be synced from xenforo? There are ~800 comments, does it mean 800 http requests made to wordpress? Please consider that even new comments are not synced at the moment.

      Just curiousity, I didnt have time to dig more into the BD API, are the comments synced via GET/POST per comment or directly by SQL on the database? Most likely GET/POST, but just want to make sure.
       
  3. def

    def New Member

    Hi

    We know easy way to force wp comments to be synced (again) to xf thread: modify timestamp in the table wp_xfac_sync. But this works only one way, that is: copies wp comments into xf thread posts. How to force wp to add xf comments? We could delete all wp comments, and then import all from xf...
    This can be unrelated but we have warning entries in apache apache2 error log:[Sun Dec 07 22:40:23 2014] [error] [client 127.0.0.1] PHP Warning: file_get_contents(http://xf/api/index.php?posts/&...=1&order=natural_reverse&oauth_token=): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found\r\n in /www/wp/wp-content/plugins/xenforo-api-consumer/includes/helper/api.php on line 310

    [Sun Dec 07 22:40:23 2014] [error] [client 127.0.0.1] PHP Warning: file_get_contents(http://xf/api/index.php?posts/&...=1&order=natural_reverse&oauth_token=): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found\r\n in /www/wp/wp-content/plugins/xenforo-api-consumer/includes/helper/api.php on line 310

    [Sun Dec 07 22:40:24 2014] [error] [client 127.0.0.1] PHP Warning: file_get_contents(http://xf/api/index.php?posts/&...=1&order=natural_reverse&oauth_token=): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found\r\n in /www/wp/wp-content/plugins/xenforo-api-consumer/includes/helper/api.php on line 310

    [Sun Dec 07 22:40:25 2014] [error] [client 127.0.0.1] PHP Warning: file_get_contents(http://xf/api/index.php?posts/&...=1&order=natural_reverse&oauth_token=): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found\r\n in /www/wp/wp-content/plugins/xenforo-api-consumer/includes/helper/api.php on line 310

    [Sun Dec 07 22:40:26 2014] [error] [client 127.0.0.1] PHP Warning: file_get_contents(http://xf/api/index.php?posts/&...=1&order=natural_reverse&oauth_token=): failed to open stream: HTTP request failed! HTTP/1.1 404 Not Found\r\n in /www/wp/wp-content/plugins/xenforo-api-consumer/includes/helper/api.php on line 310
    In general bridge works, but we just into this issue with few threads...
    BTW, is there any plan improve plugin to handle updates of the content? Comments may be removed by the moderators, or changed by them, or changed even by the users themselves... This can be done on both sides: xf and wp.

    WP Post in our bussiness scenario may be changed multiple times...

    Also it would be nice to see guest user data (name, wp id, xf id) to be shown in the panel...

    Can the log have filter? Example: show errors only (and then option to remove entries matching selection only. This way I could delete successful log entries, and keep only those with error)

    Can the log have more information what is the actual meaning and consequence of the error?
     
Loading...