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

Add admin facility to reconcile with a slave server #49

Open
4 of 7 tasks
bobbingwide opened this issue Jan 23, 2020 · 5 comments
Open
4 of 7 tasks

Add admin facility to reconcile with a slave server #49

bobbingwide opened this issue Jan 23, 2020 · 5 comments
Assignees

Comments

@bobbingwide
Copy link
Owner

bobbingwide commented Jan 23, 2020

In #34 I added a batch facility to perform reconciliation between the master and the slave site. In a couple of weeks time I'm travelling to NZ for a month. If I do any work on my live sites I'd like to be able to reconcile the changes in my local machine on return. Although the batch reconciliation appears to work I'm wary about using it. It all happens so fast! Even though I have the ability to revert to a previous revision I'm still nervous.

I added "Do Not Clone" logic in #37 so that I could avoid pushing and pulling new content that I don't actually want cloning.

Now I want to add a UI in the oik options > clone admin page to allow me to control the reconciliation. It's primarily for pulling new content created on the Live server: blocks, block examples, posts, pages and plugins.

Requirements

  • Admin interface to reconcile content between the master and a slave server
  • Ability to pull new content
  • Ability to pull new attachments
  • Ability to prevent cloning of content marked 'Do Not Clone'
  • Ability to detect a post that's been updated in both master and slave
  • Ability to list content that has not yet been cloned - for push.
  • Batch interface should still work

Proposed solution

  • Rename existing batch solution
  • Develop new classes to support batch (CLI) and online processing
  • Add a simple form to select the slave server and the post types to process.
  • Doesn't need to use the WordPress admin page listing
@bobbingwide bobbingwide self-assigned this Jan 23, 2020
@bobbingwide bobbingwide added this to To do in oik-clone v2.0.0 via automation Jan 23, 2020
@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 26, 2020

Ability to detect a post that’s been updated in both master and slave.

Not sure what to do here? Probably offer both push and pull. Can we also implement the compare function?

@bobbingwide
Copy link
Owner Author

Ability to list content that has not been cloned.

This is possible using a bw_table shortcode displaying the clone information as a field.

  • In the admin page it should come as a separate section.
  • It would lists the posts that have not been cloned and which don’t match existing posts ( by post_type and name ).
  • Ideally this section would come before the mapping section... but it should take into account the mapping section to eliminate posts with the same name.

bobbingwide added a commit that referenced this issue Jan 27, 2020
bobbingwide added a commit that referenced this issue Jan 27, 2020
bobbingwide added a commit that referenced this issue Jan 27, 2020
bobbingwide added a commit that referenced this issue Jan 27, 2020
bobbingwide added a commit that referenced this issue Jan 27, 2020
@bobbingwide
Copy link
Owner Author

bobbingwide commented Jan 29, 2020

While looking at the embed shortcode, since it's been changed in a recent version of WordPress I tried reconciling s.b/oikcom with oik-plugins.com. It appeared to want to import the oik_shortcodes/embed post even though it already existed. Needs investigating.

Explanation

There was a mismatch between post names. embed-2 and embed.

@bobbingwide
Copy link
Owner Author

What's more concerning is what happened when I performed the pull.
image

Two problems here.

  1. PHP Notices.
  2. I'll have to eliminate or escape the echos

@bobbingwide
Copy link
Owner Author

Not closing. New issue raised while trying to retest.

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

No branches or pull requests

1 participant