bobbingwide / oik-clone

Clone content between sites
https://www.oik-plugins.com/oik-plugins/oik-clone-clone-your-wordpress-content/
GNU General Public License v2.0
5 stars 0 forks source link

Cater for slave having switched protocol from http to https #19

Open bobbingwide opened 7 years ago

bobbingwide commented 7 years ago

When cloning a new plugin version to oik-plugins.com the target post ID was returned as 0. I realised that I needed to change the slave to https://oik-plugins.com Having made this change the http: entries show as "Previously cloned" and it looks like posts need to be cloned all over again. What should we do about this?

Proposed solution

Alter the solution for #16. Since we also want to change oik-plugins.co.uk to be an almost exact copy of oik-plugins.com we should be able to cater for multiple target slaves.

bobbingwide commented 6 years ago

Note that the current solution does not notice a problem when attempting to clone using http: and the server is forcing https:. The 302 response from the wp_remote_post() call is not detected, so it appears the post is cloned to post ID 0.

bobbingwide commented 5 years ago

Having implemented the multisite pull logic without forcing the schema, the batch pull set the scheme to http://. So recloning in the admin failed to perform post id mapping. It would help if logic to determine the slave’s mappings was independent of the scheme.