CMASFO is experiencing issues connecting their WordPress site to Discourse using the WP Discourse plugin. They receive an error message stating that an invalid response was returned from Discourse and provide connection logs. The logs show a 404 error and a failed SSL verification. angus suggests checking a related post and another post about a similar error.
After trying multiple environments, CMASFO resolves the issue by manually installing WordPress. angus suspects that the problem was likely due to the version of php-curl on the server.
I made api key, typed url, api, username, and this is what I get from the WP Discourse plugin.
You are not connected to Discourse. Check that your connection settings are correct. If the issue persists, enable connection logs and check Logs.
And this is the log that I get.
[2022-06-05 17:20:38] connection.INFO: check_connection_status.failed_to_connect {“error”:“wpdc_response_error”,“message”:“An invalid response was returned from Discourse”,“http_code”:“”,“http_body”:“”}
And sometimes this log.
[2022-06-05 16:14:55] connection.INFO: check_connection_status.failed_to_connect {“error”:“wpdc_response_error”,“message”:“An invalid response was returned from Discourse”,“http_code”:404,“http_body”:“\r\n404 Not Found\r\n\r\n<h1>404 Not Found\r\n<hr><center>nginx\r\n\r\n\r\n”}
curl failed to verify the legitimacy of the server and therefore could not
establish a secure connection to it. To learn more about this situation and
how to fix it, please visit the web page mentioned above.
For this kind of issue please see my response here
In particular:
I’d recommend you press your hosting provider a bit more, asking them why there’d be an inability to make a cURL request to a domain. If they have some more specific reason to think it’s an issue with the WP Discourse plugin, and not say, an incorrect cURL version on the server (which on the face of it is more likely), they’re welcome to post here, or even pm me, and I’d be happy to look into it further with them.