Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

blank endpoint_url in PushClient::test_connection() #147

Open
vladimirdulov opened this issue May 3, 2018 · 0 comments
Open

blank endpoint_url in PushClient::test_connection() #147

vladimirdulov opened this issue May 3, 2018 · 0 comments

Comments

@vladimirdulov
Copy link

Hi,

We are using Syndication 2.1 and faced with the error "Something went wrong when connecting to the site. Site disabled." after submitting the plugin settings, e.g. OAuth token. After some research we found out that it failed in Client_Manager ::test_connection() whilst it's testing the connection.

We've got it working properly by applying the following patch:

index a5cc30d..2959f04 100644
--- a/includes/clients/rest-push-new/class-push-client.php
+++ b/includes/clients/rest-push-new/class-push-client.php
@@ -452,6 +452,7 @@ class Push_Client extends Pusher {
         * @return bool
         */
        public function test_connection( $site_id ) {
+               $this->init( $site_id );
                $response = wp_remote_get(
                        $this->endpoint_url . '/wp-json/wp/v2/posts',
                        array(

We propose to include it into upstream so it hasn't been lost after upgrade.

Thank you,
Vladimir

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant