10up / distributor

Share content between your websites.
https://distributorplugin.com
GNU General Public License v2.0
635 stars 156 forks source link

Getting: Limited connection established #327

Closed anton-roos closed 4 years ago

anton-roos commented 5 years ago

I am using the WordPress.com rest API and I still get this error.

Authentication failed. Push distribution unavailable. Pull distribution limited to basic content, i.e. title and content body.

anton-roos commented 5 years ago

Someone said something about too many post types. How do I check this?

jeffpaul commented 5 years ago

@anton-roos a couple questions/comments for you: 1) Can you confirm that the user role in Distributor > External Connections is the same role for the user trying to push content to the external site? 2) In this list of Known Caveats/Issues there's the following note on External Connection Post Type Support:

When pulling content from an external connection, only "Posts" (post type) content will appear. Pulling other post types from external connections is not currently supported. Internal connections (multisite) support multiple post types, and other post types can still be pushed to external connections that support the post type. This will be addressed in an upcoming release, including an improved interface for navigating available content by post types supported on both sides.

In addition, in order for distribution to work with external connections that have custom post type content, that post type needs to be registered with the argument show_in_rest => true on the external site. Are you trying to pull something besides a Post to your external site? If so, is that custom post type registered as noted above?

Let me know if neither of those two questions/issues apply in your case and we can continue to triage your issue... thanks!

Webagent05 commented 5 years ago

Hello There,

I was very happy to see your plugin, but after 3 hours testing ... still doesn't work.

Same issue "authentication failed."

  1. I've installed the plugin on the master and the slave.
  2. Installed the 'application password' plugin, but it isn't clear to me or I need to use the plugin generated password or the 'user' password. (Tried both of course)
  3. Roles are the same

I don't know where to look now. Settings are very simple, but ... I'm missing something or ...?

Please help me out. Plugin would be a great gift ... if we get it work.

p.s. The installation instructions are very poor. Already thought about a Youtube movie?

Looking forward to your reply.

Thanks in advance.

Kind regards,

Webagent05

jeffpaul commented 5 years ago

@Webagent05 we released version 1.4 earlier today with updated instructions and information about setting up external connections. If you're not on 1.4, then please update and let me know if you're still unable to properly setup the external connections... thanks!

Webagent05 commented 5 years ago

@jeffpaul I still have the same message.

I made an application password. Used the username + application password.

Websites are running on the same server, https, ... no special settings, no cache plugins enabled.

What's next we can do, to find out the issue?

Kind regards,

Webagent05

ps. Running on PHP7.2

arsendovlatyan commented 5 years ago

How many custom post types do you have?

On Sat, Mar 9, 2019, 23:06 Webagent05 notifications@github.com wrote:

@jeffpaul https://github.com/jeffpaul I still have the same message.

I made an application password. Used the username + application password.

Websites are running on the same server, https, ... no special settings, no cache plugins enabled.

What's next we can do, to find out the issue?

Kind regards,

Webagent05

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/10up/distributor/issues/327#issuecomment-471212409, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCI38L0moYSx5A9ugBTylCSE9Wq0aa0ks5vVAY1gaJpZM4a0STM .

Webagent05 commented 5 years ago

@jeffpaul got it solved. After update connection is working.

But now I'm checking the canonical function. I can't find the canonical url in my source code. I'm using Yoast SEO premium.

Looked around and found some information between the posts here. Checked the source code and seems to me compatibility is integrated, ... but seems not to work ... not showing canonical link.

Kind regards,

Webeagent05

p.s. I like the idea of the plugin, would love to contribute with features. ;)

jeffpaul commented 5 years ago

@Webagent05 I see from #346 that you were able to get things setup, so I'm not sure if you're still having issues with the Yoast. I'm checking with our team member who's most familiar with that part of the codebase and will get back to you with any details.

Ritesh-patel commented 5 years ago

@Webagent05 you can use dt_after_set_meta action to debug this which will be called after meta is set. You can check the hook in source code here https://github.com/10up/distributor/blob/1.4.0/includes/utils.php#L194.

jeffpaul commented 5 years ago

@anton-roos any updates on your setup testing?

jeffpaul commented 5 years ago

@anton-roos here are some updated instructions for setting up External Connections, please give them a try and see if that helps resolve your issues: https://github.com/10up/distributor/tree/fix/readme-instructions#setup-external-connections-using-application-passwords. Thanks!

Webagent05 commented 5 years ago

Correction on comment...

Hi all, what I noticed when add a rule to htaccess ... when wordpress update runs. The rule dissapears. So evey update of WP need to add "authenticaion rule" again.

Maybe need to check the htaccess (not config file) file.

jeffpaul commented 5 years ago

@Webagent05 are those changes related to Distributor or something else?

Webagent05 commented 5 years ago

Wordpress core .... update also updates rewrite engine rules.

Application password plugin.

RewriteRule .* - [E=REMOTE_USER:%{HTTP:Authorization}]

Everytime wordpress core update this rule dissapears in htaccess, ....

Sorry not wordpress config as mentioned in my earlier comment.

anton-roos commented 5 years ago

@jeffpaul I am still struggling, even after updating to 1.4

jeffpaul commented 5 years ago

@anton-roos the most current version of Distributor is 1.4.1, please ensure you're using that on all your sites. Also, can you confirm that you followed the External Connections steps here: https://github.com/10up/distributor/tree/fix/readme-instructions#setup-external-connections-using-application-passwords ?

anton-roos commented 5 years ago

I got it to work by deleting all information from the database (External Connections) etc. Then following the steps EXACTLY like on the link thank you. @jeffpaul it did give me an error at first but came right after a while.

jeffpaul commented 5 years ago

@anton-roos do you happen to recall what the error message was and when/where it appeared?

jeffpaul commented 5 years ago

@anton-roos I'm going to close this issue as resolved, but please do let me know if you're running into any further issues so we can try to help... thanks!

anton-roos commented 5 years ago

@jeffpaul I am still getting Could not pull content from connection due to error. I am not sure why this is, what else can I do to try and find the problem?

jeffpaul commented 5 years ago

@anton-roos on the site that you're viewing the Pull Content screen, if you go to the External Connections screen, what do you see as the Title / URL / Status / Date information for the site you're trying to pull content from? Also, what version of WordPress and Distributor are you using on those sites?

jeffpaul commented 4 years ago

@anton-roos will you please confirm the details from my prior question so I can continue to try and help troubleshoot for you?

jeffpaul commented 4 years ago

@anton-roos will you please confirm the details from my prior question so I can continue to try and help troubleshoot for you?

anton-roos commented 4 years ago

Hi @jeffpaul I will try recreate it again tomorrow and if possible post a few screenshots.

jeffpaul commented 4 years ago

@anton-roos any results from your testing?

jeffpaul commented 4 years ago

I'm closing this due to lack of response and assuming connections are working correctly, but please re-open with additional details if things are not functioning as expected... thanks!