WordPress / API Consumer Setup Issues

Discussion in 'WordPress' started by Tink, Sep 11, 2014.

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

    Tink New Member

    Greetings,

    Looking for a little debugging advice as I am unable to get the bridge between WordPress and XenForo set up on my server.

    The setup on the XenForo side went fine - [bd] API 1.2.1b is installed, and I created an API Key and a nice long API Secret. The Redirect Uri points to the root of our server (http not https, although both work at present as the server is still being set up). The root of the server is where WordPress is installed. I have at this time checked none of the automatic authorize options.

    The issue is on the WordPress side where XenForo API Consumer lives. The installation of the files went fine and the plug-in appears, and after the XenForo setup was done, I clicked Settings to enter the API key and API Secret and the path to XenForo. Since it could not find XenForo on its own those were pretty much the only options that appeared at the time, and now in retrospect I am not positive I remembered the path to XenForo - it is installed under the forum directory under the root of the web server. When I clicked save it gave me some error so I tried again and it still did not work. I saw where it was mentioned to try rebooting the server/software so I did that, but now when I click Settings, I always get this error and cannot get to where I can view or change ANY settings:

    Code:
    Internal Server Error
    
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
    
    More information about this error may be available in the server error log.
    Of course, the server log acknowledges serving up the php but nothing else.

    What file can I remove to reset the plug-in and start over?

    Thanks - oh, and contact me if you are a consultant familiar with WP and XenForo and are interested in taking on a project to help with this and one other project!

    Tink



     
  2. Tink

    Tink New Member

    One other thing - I do suspect I coded the XenForo location wrong because on the WP logon screen, there is a link to "Login with XenForo", and the redirect part of that link is the root of our web server rather than the root/forum as it should be for XenForo. So perhaps that is the cause of the error and if I can just nuke a file or edit something to fix that URL it will work again.
     
  3. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Sorry to hear about your problem. You should enter the url, not path on server. Consult this for detail instruction:

    https://xfrocks.com/api-support/articles/howto-complete-wordpress-xenforo-bridge-setup.177/

    It should not cause 500 error anyway so I will look into that. In the mean time, you can use phpMyAdmin or similar tool to delete the option from WordPress wp_options table (the table prefix may be different). Delete the ones that start with "xfac_" like xfac_root, xfac_client_id, xfac_client_secret, etc.
     
  4. Tink

    Tink New Member

    It still does not like me. :(

    I removed everything from the database (thanks for pointing out where the settings are stored) and that allowed access to the settings again. However, I again entered the root, API, and API Key - making sure that the path was correct (http://(domain)/forum/api as /forum is where XenForo is installed, but it immediately gave me an internal server error:
    Code:
    Internal Server Error
    
    The server encountered an internal error or misconfiguration and was unable to complete your request.
    Please contact the server administrator to inform of the time the error occurred and of anything you might have done that may have caused the error.
    
    More information about this error may be available in the server error log.
    
    Could it be the structure I am using?
    http://(domain)/ is where WordPress is installed
    http://(domain)/forum is where XenForo is installed.

    I wish the error gave me a little more to go on.
     
  5. Tink

    Tink New Member

    I figured it out - this information may help people in the future!

    This web server is new, the pointer for our domain is still pointing to our current production server where Wordpress and XenForo do not exist. In setting up WordPress, I was forced by the server admins to use the domain name because the server thinks that is the domain name. When I do that though, the computer I am administering XenForo and Wordpress with keep going to our production server, so I was instructed by the hosting company to edit my hosts file to make it work. I suggested just setting the WordPress domain to the IP address of the server but was told that would be a bad idea - I think that was bad information. When the API plug-in is trying to access XenForo, it is somehow using a different DNS server because the workstation I am administering from and the server itself both know the domain as being this new server, but XenForo was going to the real/production server. In the WP options table I edited the domain to the IP address of the server and it then allowed me to access all of the options.

     
  6. xfrocks

    xfrocks XenForo rocks!
    Staff Member

    Oh. So the bridge request the old server while in fact it should send request to the new server? That explains why it doesn't work but still unclear what caused the 500 server error. Thank you for the investigation. I will have to test this more.
     
Loading...