XPress - A theme and bridge for bringing WordPress into XenForo [Deleted]

Which route is it listing for that? That generally happens when XPress isn't able to authenticate against your WordPress API, potentially because your API calls are going through a proxy server such as Cloudflare, or you have a WordPress plugin block API calls. If you haven't already, setting up an API Password is a good first step.

I do not setting up any API Password

PHP:
GuzzleHttp\Exception\ClientException: Client error: `POST https://www..com/wp/?xf_user=2&rest_route=%2Fxpress%2Fv1%2Fsettings` resulted in a `401 Unauthorized` response:

{"code":"rest_forbidden","message":"Sorry, you are not allowed to do that.","data":{"status":401}}

in /var/www/vhosts/com/public_html/src/vendor/guzzlehttp/guzzle/src/Exception/RequestException.php:113

Stack trace:

#0 /var/www/vhosts/com/public_html/src/vendor/guzzlehttp/guzzle/src/Middleware.php(66): GuzzleHttp\Exception\RequestException::create()

#1 /var/www/vhosts/com/public_html/src/vendor/guzzlehttp/promises/src/FulfilledPromise.php(39): GuzzleHttp\Middleware::GuzzleHttp\{closure}()

#2 /var/www/vhosts/com/public_html/src/vendor/guzzlehttp/promises/src/TaskQueue.php(47): GuzzleHttp\Promise\FulfilledPromise::GuzzleHttp\Promise\{closure}()



#3 /var/www/vhosts/com/public_html/src/vendor/guzzlehttp/promises/src/Promise.php(246): GuzzleHttp\Promise\TaskQueue->run()

#4 /var/www/vhosts/com/public_html/src/vendor/guzzlehttp/promises/src/Promise.php(223): GuzzleHttp\Promise\Promise->invokeWaitFn()

#5 /var/www/vhosts/com/public_html/src/vendor/guzzlehttp/promises/src/Promise.php(62): GuzzleHttp\Promise\Promise->waitIfPending()

#6 /var/www/vhosts/com/public_html/src/vendor/guzzlehttp/guzzle/src/Client.php(131): GuzzleHttp\Promise\Promise->wait()

#7 /var/www/vhosts/com/public_html/src/vendor/guzzlehttp/guzzle/src/Client.php(89): GuzzleHttp\Client->request()

#8 /var/www/vhosts/com/public_html/src/addons/ThemeHouse/Core/Http/HttpClient/20181220.php(23): GuzzleHttp\Client->__call()

#9 /var/www/vhosts/com/public_html/src/addons/ThemeHouse/XLink/RemoteHandler/Traits/APICall.php(70): ThemeHouse\Core\Http\HttpClient->simplePost()



#10 /var/www/vhosts/com/public_html/src/addons/ThemeHouse/XPress/RemoteHandler/Platform.php(71): ThemeHouse\XPress\RemoteHandler\Platform->callAPI()



#11 /var/www/vhosts/com/public_html/src/addons/ThemeHouse/XLink/Admin/Controller/Platform.php(190): ThemeHouse\XPress\RemoteHandler\Platform->syncSettingsToRemote()



#12 /var/www/vhosts/com/public_html/src/XF/Mvc/Dispatcher.php(350): ThemeHouse\XLink\Admin\Controller\Platform->actionSave()

#13 /var/www/vhosts/com/public_html/src/XF/Mvc/Dispatcher.php(257): XF\Mvc\Dispatcher->dispatchClass()

#14 /var/www/vhosts/com/public_html/src/XF/Mvc/Dispatcher.php(113): XF\Mvc\Dispatcher->dispatchFromMatch()

#15 /var/www/vhosts/com/public_html/src/XF/Mvc/Dispatcher.php(55): XF\Mvc\Dispatcher->dispatchLoop()

#16 /var/www/vhosts/com/public_html/src/XF/App.php(2184): XF\Mvc\Dispatcher->run()

#17 /var/www/vhosts/com/public_html/src/XF.php(391): XF\App->run()

#18 /var/www/vhosts/com/public_html/admin.php(13): XF::runApp()

#19 {main}





Full Response:

{"code":"rest_forbidden","message":"Sorry, you are not allowed to do that.","data":{"status":401}}
 
I'd definitely try setting up an API password then. Your WordPress instance is not able to detect the API call as coming from XenForo/Internal, so it's blocking API access.
 
I'd definitely try setting up an API password then. Your WordPress instance is not able to detect the API call as coming from XenForo/Internal, so it's blocking API access.

From where to get the API Key for both $config[‘xpressAPIPassword’] = ‘YOUR_API_PASSWORD’; and define(‘XLINK_API_PASSWORD’, ‘YOUR_API_PASSWORD’); ?
 
From where to get the API Key for both $config[‘xpressAPIPassword’] = ‘YOUR_API_PASSWORD’; and define(‘XLINK_API_PASSWORD’, ‘YOUR_API_PASSWORD’); ?

That's up to you. Any alphanumeric string works.

{"code":"rest_no_route","message":"Es wurde keine Route gefunden, die mit der URL und der Request-Methode identisch ist.","data":{"status":404}}

There's a couple of possibilities for that. Provided you're on the latest version of XPress and XLink that would indicate that either:
  • Your provided WordPress URL is wrong or your API url has been changed
  • Your WordPress API is disabled or otherwise inaccessible
  • Or the XPress plugin is not installed or enabled on WordPress
 
That's up to you. Any alphanumeric string works.



There's a couple of possibilities for that. Provided you're on the latest version of XPress and XLink that would indicate that either:
  • Your provided WordPress URL is wrong or your API url has been changed
  • Your WordPress API is disabled or otherwise inaccessible
  • Or the XPress plugin is not installed or enabled on WordPress

I got this error when setup the API on config xenforo

[STDERR] PHP Parse error: syntax error, unexpected '$config' (T_VARIABLE), expecting ']' in /var/www/vhosts/com/public_html/src/config.php on line 19

[STDERR] PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0
 
Make sure to type, not copy from our documentation. Our automated system unfortunately converts single quotes ' to typographic quotes
 
Make sure to type, not copy from our documentation. Our automated system unfortunately converts single quotes ' to typographic quotes

I will check it

Must I using same Xenforo database username and password to WordPress config ?

Full Response:
{"code":"rest_no_route","message":"No route was found matching the URL and request method","data":{"status":404}}
 
Last edited:
That's up to you. Any alphanumeric string works.



There's a couple of possibilities for that. Provided you're on the latest version of XPress and XLink that would indicate that either:
  • Your provided WordPress URL is wrong or your API url has been changed
  • Your WordPress API is disabled or otherwise inaccessible
  • Or the XPress plugin is not installed or enabled on WordPress

This i read under entities

Code:
ThemeHouse\XLink\APIException: API call to 'Home' failed: Request blocked by remote installation in src/addons/ThemeHouse/XLink/RemoteHandler/Traits/APICall.php at line 81

    ThemeHouse\XPress\RemoteHandler\Entity->callAPI() in src/addons/ThemeHouse/XPress/RemoteHandler/Entity.php at line 108
    ThemeHouse\XPress\RemoteHandler\Entity->loadPosts() in src/addons/ThemeHouse/XPress/RemoteHandler/Entity.php at line 78
    ThemeHouse\XPress\RemoteHandler\Entity->loadRemoteEntities() in src/addons/ThemeHouse/XLink/Admin/Controller/Entities.php at line 75
    ThemeHouse\XLink\Admin\Controller\Entities->actionIndex() in src/XF/Mvc/Dispatcher.php at line 350
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
    XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
    XF\App->run() in src/XF.php at line 391
    XF::runApp() in admin.php at line 13
 
This i read under entities

Code:
ThemeHouse\XLink\APIException: API call to 'Home' failed: Request blocked by remote installation in src/addons/ThemeHouse/XLink/RemoteHandler/Traits/APICall.php at line 81

    ThemeHouse\XPress\RemoteHandler\Entity->callAPI() in src/addons/ThemeHouse/XPress/RemoteHandler/Entity.php at line 108
    ThemeHouse\XPress\RemoteHandler\Entity->loadPosts() in src/addons/ThemeHouse/XPress/RemoteHandler/Entity.php at line 78
    ThemeHouse\XPress\RemoteHandler\Entity->loadRemoteEntities() in src/addons/ThemeHouse/XLink/Admin/Controller/Entities.php at line 75
    ThemeHouse\XLink\Admin\Controller\Entities->actionIndex() in src/XF/Mvc/Dispatcher.php at line 350
    XF\Mvc\Dispatcher->dispatchClass() in src/XF/Mvc/Dispatcher.php at line 257
    XF\Mvc\Dispatcher->dispatchFromMatch() in src/XF/Mvc/Dispatcher.php at line 113
    XF\Mvc\Dispatcher->dispatchLoop() in src/XF/Mvc/Dispatcher.php at line 55
    XF\Mvc\Dispatcher->run() in src/XF/App.php at line 2184
    XF\App->run() in src/XF.php at line 391
    XF::runApp() in admin.php at line 13

It doesn't matter where the error is triggered in the XenForo code. The issue is your WordPress API not being accessible by XenForo due to one of the reasons I listed in my last post.
 
I'd definitely try setting up an API password then. Your WordPress instance is not able to detect the API call as coming from XenForo/Internal, so it's blocking API access.

If the password has been assigned, you still have to save it somewhere, if so where?
 
If the password has been assigned, you still have to save it somewhere, if so where?
You're putting it into your XenForo and WordPress configuration files, that's already where it gets stored, similar to your database credentials for example.
 
XPress will attempt to create a thread under the currently linked user if you leave the thread author field empty. The thread id field is there if you want to link an existing thread and can otherwise be left empty, in which case it will create a new thread for you.
 
XPress will attempt to create a thread under the currently linked user if you leave the thread author field empty. The thread id field is there if you want to link an existing thread and can otherwise be left empty, in which case it will create a new thread for you.
I got this error when keep it empty

An exception occurred: [LogicException] Cannot save with validation errors. Use validate() to ensure there are no errors. (First error: Please enter a valid message.) in src/XF/Service/ValidateAndSavableTrait.php on line 34


Are there some mistake when creating new thread
 
The issue is mentioned in your error. You tried to publish an empty post, which can't be converted into a thread as xf posts can't be empty.
 
Top Bottom