Everything is fine but you are not connected to Discourse

I got this information after my configuration completed.

“You are not connected to Discourse. If you are setting up the plugin, this notice should go away after completing the form on this page.”

I checked everything and didn’t find the solution, I can accessed the rest url via Curl command in the host server, both Wordpress and Discourse.

Any configuration is normal in my Wordpress except I changed the plugin path via wp-config.php like this:

if ( !defined(‘ABSPATH’) )
define(‘ABSPATH’, dirname(FILE) . ‘/’);
define (‘WP_CONTENT_FOLDERNAME’, ‘func’);

define (‘WP_CONTENT_DIR’, ABSPATH . WP_CONTENT_FOLDERNAME);

define(‘WP_SITEURL’, ‘https://’ . $_SERVER[‘HTTP_HOST’] . ‘/’);
define(‘WP_CONTENT_URL’, WP_SITEURL . WP_CONTENT_FOLDERNAME);

I am not sure if this configuration caused the issue.

I get this error for a testing which I post this link: https://www.Mysite.com/api/wp-discourse/v1/update-topic-content

And as you see, I rewrite the path from “wp-json” to “api”.

{
    "code": "rest_no_route",
    "message": "未找到匹配URL和请求方式的路由",
    "data": {
        "status": 404
    }
}

That route requires an authenticated POST request. It is meant to be used by Discourse webhooks. It looks like you are getting the correct response.

This happens when a 200 response is not returned from a request made to Discourse with the Publishing Username and API Key that you have set. Are you using the All Users API key from Discourse?

3 Likes

Hi Simon,

I got an mail notification and find this “cURL error 60: SSL certificate problem: unable to get local issuer certificate”

so I changed my ssl configuration from DigiCert Global Root CA to let’s Encrpyt, now the connecting is fine.

Thx.:nerd_face:

3 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.