Xenforo 2 Unable to Determine API Version

Discussion in 'WordPress' started by ecruzartist, Sep 7, 2018.

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

    ecruzartist New Member

    #1 , Sep 7, 2018
    Last edited: Sep 10, 2018
    Hi,
    I recently upgraded to XF2. Since then, the wordpress plugin has been unable to determine the api version. I've switched the tokens, etc. with zeros. Here's what our logs captured.


    [Fri Sep 07 14:46:48.612921 2018] [:error] [pid 12111] [client 00.000.000.00:53362] _xfac_api_curl POST (https://www.toonzone.net/forums/api/index.php?batch&oauth_token=0,0000000000,0000000000000000000000000000000000000000000000000000, '[{"id":"route0","method":"POST","uri":"tools\\\\/link","params":{"type":"public","route":"index"}},{"id":"route1","method":"POST","uri":"tools\\\\/link","params":{"type":"public","route":"account\\\\/alerts"}},{"id":"route2","method":"POST","uri":"tools\\\\/link","params":{"type":"public","route":"conversations"}},{"id":"route3","method":"POST","uri":"tools\\\\/link","params":{"type":"public","route":"login"}},{"id":"route4","method":"POST","uri":"tools\\\\/link","params":{"type":"public","route":"login\\\\/login"}},{"id":"route5","method":"POST","uri":"tools\\\\/link","params":{"type":"public","route":"register"}}]') -> 200, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.612971 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | HTTP/1.1 200 OK, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.612994 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Date: Fri, 07 Sep 2018 21:46:48 GMT, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613012 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Server: Apache, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613030 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | X-Frame-Options: SAMEORIGIN, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613064 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | X-Content-Type-Options: nosniff, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613084 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Last-Modified: Fri, 07 Sep 2018 21:46:48 GMT, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613104 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Api-Debug-Db-Queries: 5, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613124 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Api-Debug-Memory-Usage: 7 MB, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613142 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Api-Debug-Memory-Peak: 7 MB, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613160 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Api-Debug-Page-Time: 0.052556, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613181 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Expires: Thu, 19 Nov 1981 08:52:00 GMT, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613199 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Cache-Control: private, no-cache, max-age=0, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613216 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Set-Cookie: xf_session=kqKNS_Zvip-GdmYq8QyFx8Cac--I7g3j; path=/; secure; httponly, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613236 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Content-Length: 991, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613255 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Vary: Accept-Encoding, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613273 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Referrer-Policy: origin-when-cross-origin, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613294 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Connection: close, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613313 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Content-Type: application/json; charset=utf-8, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613334 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | Set-Cookie: SERVERID=rbqn03h01rwmsession; path=/, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613354 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | , referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613376 2018] [:error] [pid 12111] [client 00.000.000.00:53362] | {"jobs":{"route0":{"_job_error":"The requested page could not be found. (Code: invalid_route, controller: -, action: -)","_job_result":"error"},"route1":{"_job_error":"The requested page could not be found. (Code: invalid_route, controller: -, action: -)","_job_result":"error"},"route2":{"_job_error":"The requested page could not be found. (Code: invalid_route, controller: -, action: -)","_job_result":"error"},"route3":{"_job_error":"The requested page could not be found. (Code: invalid_route, controller: -, action: -)","_job_result":"error"},"route4":{"_job_error":"The requested page could not be found. (Code: invalid_route, controller: -, action: -)","_job_result":"error"},"route5":{"_job_error":"The requested page could not be found. (Code: invalid_route, controller: -, action: -)","_job_result":"error"}},"system_info":{"debug_url":"https:\\/\\/www.toonzone.net\\/forums\\/api\\/index.php?batch&oauth_token=00000000000000000000000000000000000000000000000000&_debug=1"}}, referer: https://www.toonzone.net/wp-admin/plugins.php
    Log in
    animesuperhero.com

    [Fri Sep 07 14:46:48.613664 2018] [:error] [pid 12111] [client 00.000.000.00:53362] xfac_option_getMeta rebuilt $meta=array (\n 'root' => 'https://www.toonzone.net/forums/api/',\n 'clientId' => 'xxxxxxxx',\n 'clientSecret' => 'xxxxxxxx',\n 'version' => 13,\n 'linkIndex' => '',\n 'modules' => \n array (\n ),\n 'forums' => \n array (\n ),\n), referer: https://www.toonzone.net/wp-admin/plugins.php
     
  2. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Which version of the api add-on are you using?
     
  3. ecruzartist

    ecruzartist New Member

    [bd] API 2.0.0 Alpha 2
    and
    1.3.5 for the WP plugin
     
  4. ecruzartist

    ecruzartist New Member

    @xfrocks What might I be able to do to fix this, or will it be fixed in a future add-on release?
     
  5. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    We have alpha 4 for awhile now, can you try upgrading?

    The API is not 100% complete but most of the WP bridge functionalities should work.
     
  6. ecruzartist

    ecruzartist New Member

    @xfrocks Yes. Thank you. For whatever reason, I misread the title of the thread with the updated API plugin as not being Alpha 4. I'm running into a new problem where upon trying to associate an admin account in wp with an admin account in xf, the connection is made, but when I try to log in, it thinks the account doesn't have permission to access the wordpress admin panel and which I click on the option to add the admin scope, it doesn't seem to do anything.
     
  7. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    That's probably a problem because the alpha 4 is still not feature complete... Do you have the exact message / screenshot?
     
  8. ecruzartist

    ecruzartist New Member

    Ah, gotcha. There's no error in the logs, but this is the error that appears on screen.

    Code:
    {
    status: "error",
    errors: [
    "You do not have permission to view this page or perform this action."
    ],
    system_info: {
    time: 1537221661,
    visitor_id: xfuid00
    }
    }
    The URL generating is using the following formatting. I switched out the actual #s with 0's.
    www.toonzone.net/forums/api/index.php?tools/login&oauth_token=000000%2C0000000%2C00000000000000000000000000000%2C00000000&redirect_uri=https%3A%2F%2Fwww.toonzone.net%2Fwp-admin%2F
     
Loading...