Xenforo 2 / WP sync - Unable to determine API version

Discussion in 'WordPress' started by pete, Mar 18, 2018.

  1. Have feature suggestions for the WordPress plugin? Post or vote here.
  1. pete

    pete New Member

    Installed the alpha version of bd API, created new client in XF, added the details to the XF consumer on the WP side (version 1.3.5) but it just returns "Unable to determine API version"
     
  2. pete

    pete New Member

    here's an error log extract (with sessions / OAUTH tokens obfuscated, just in case)

    Code:
    [18-Mar-2018 13:52:24 UTC] _xfac_api_curl GET (https://thumped.com/bbs/api/index.php?threads/&forum_id=110&order=thread_create_date_reverse&oauth_token=0%2Cxxxxxxxxx54%2C41cffxxxxxxxx7xxxxxxxxxx034b6%2CBIDXnj9hpa&_xfac=threads.php&limit=5&sticky=0&order=thread_update_date_reverse, NULL) -> 404
    [18-Mar-2018 13:52:24 UTC]                | HTTP/1.1 404 Not Found
    [18-Mar-2018 13:52:24 UTC]                | Server: nginx
    [18-Mar-2018 13:52:24 UTC]                | Date: Sun, 18 Mar 2018 13:52:24 GMT
    [18-Mar-2018 13:52:24 UTC]                | Content-Type: application/json; charset=utf-8
    [18-Mar-2018 13:52:24 UTC]                | Content-Length: 70
    [18-Mar-2018 13:52:24 UTC]                | Connection: keep-alive
    [18-Mar-2018 13:52:24 UTC]                | X-Frame-Options: SAMEORIGIN
    [18-Mar-2018 13:52:24 UTC]                | X-Content-Type-Options: nosniff
    [18-Mar-2018 13:52:24 UTC]                | Expires: Thu, 19 Nov 1981 08:52:00 GMT
    [18-Mar-2018 13:52:24 UTC]                | Cache-Control: private, no-cache, max-age=0
    [18-Mar-2018 13:52:24 UTC]                | Set-Cookie: xfo_session=CMm9XXXXXXXXXXXXXXXXNNS0n706; path=/; secure; HttpOnly
    [18-Mar-2018 13:52:24 UTC]                | Last-Modified: Sun, 18 Mar 2018 13:52:24 GMT
    [18-Mar-2018 13:52:24 UTC]                | Strict-Transport-Security: max-age=31536000
    [18-Mar-2018 13:52:24 UTC]                | Access-Control-Allow-Origin: *
    [18-Mar-2018 13:52:24 UTC]                | X-XSS-Protection: 1; mode=block
    [18-Mar-2018 13:52:24 UTC]                | X-Content-Type-Options: nosniff
    [18-Mar-2018 13:52:24 UTC]                |
    [18-Mar-2018 13:52:24 UTC]                | {"status":"error","errors":["The requested page could not be found."]}
    [18-Mar-2018 13:52:24 UTC] _xfac_api_curl GET (https://thumped.com/bbs/api/index.php?threads/&forum_id=5,118,31,34,15,6&order=thread_create_date_reverse&oauth_token=0%2C152XXXXX1154%2C41cffd4b85ec0758XXXXXXXXXXXXXXXX8514034b6%2CBIDXnj9hpa&_xfac=threads.php&limit=5&sticky=0&order=thread_update_date_reverse, NULL) -> 404
     
  3. pete

    pete New Member

    bump...
     
  4. Blatchy

    Blatchy New Member

    Same error here.
     
  5. Blatchy

    Blatchy New Member

    After messing with this for 4 hours, I am convinced that this no longer works.
     
  6. Blatchy

    Blatchy New Member

    Access log

    IP - - [03/Aug/2018:11:13:55 -0400] "POST /community/api/index.php?batch&oauth_token=0%2C1533309244%2Cdb580954d1e6ac20bf69af55f0cec7b3%2CySFD29kCMY HTTP/1.1" 200 532 "-" "-"

    ^^ Seems to be using localhost IP instead of server IP?


    MY IP - - [03/Aug/2018:11:13:55 -0400] "POST /wp-admin/admin-ajax.php HTTP/2.0" 200 67 "https://www.mysite.com/wp-admin/options-general.php?page=xfac&done=xfac_meta" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0"
     
  7. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Can you enable WP debug mode? The WP plugin will put useful info into wp-content/debug.log which may tell us why it can't detect API version.
     
    1. Blatchy

      Blatchy New Member

      Blatchy @xfrocks This is probably some of the problem


      [Table 'mysite_word.wp_xfac_auth' doesn't exist]
      SELECT * FROM wp_xfac_auth WHERE user_id = 1
       
  8. Blatchy

    Blatchy New Member

    I have rebuilt the table from an old backup so that error is resolved.
     
Loading...