Comments (7)
I can break these into 3 different issues; the first one is the only one I'm sure needs to be addressed.
That'd be great.
Also, would the GitHub endpoint support us pushing multiple files in a single call, or do we have to make an individual call for each file?
Right now we're using the CRUD API, which is one file per request. We could do a Git-clone, and work with the file system, or use some of the lower-level APIs, I believe. It's a trade off of speed for complexity as we move away from the abstractions.
if two different people are exporting, they can do so at the same time, regardless of whether the post_lock is set.
I'm not sure that's a big risk, but may be missing the use case.
from wordpress-github-sync.
Ok, I think trying to make wordpress play with git is more trouble than its worth. I think git would have to be installed on the server. With another plugin where I had to do something similar, I managed everything in js: get a list of ids from the server and go through them one by one.
Another option would be to export like 50 or 100 wen you click the link and defer the rest to WP_Cron. That should keep things spaced out enough so it doesn't error out.
I'm not sure that's a big risk, but may be missing the use case.
I misunderstood its purpose, nevermind.
from wordpress-github-sync.
I'm working on the second option (using wp_cron), but I keep getting this error when continuing from the cron:
WordPress <--> GitHub sync error: refs/heads/master expected to be at [sha]
Is that sha we're looking for here tied to the post or the repo itself? If it's the repo, I think I'd cache that as an option rather than post_meta, though I'm still not sure what this error is about.
from wordpress-github-sync.
I believe that's the blob sha, so post-specific. When you update a post, you need to specify the base sha that you're updating, which I suspect here might be stale (or just flat wrong).
from wordpress-github-sync.
It's weird because we're pushing a post for the first time, so I'm not really sure why it even has a sha to begin with... I'll have to keep investigating.
from wordpress-github-sync.
It's weird because we're pushing a post for the first time, so I'm not really sure why it even has a sha to begin with... I'll have to keep investigating.
Huh. It could be trying to update a post, when it should be creating it. IIRC they are different endpoints.
from wordpress-github-sync.
Yeah, that could be it. It looks like the same endpoint, but the create API doesn't require the sha. But that wouldn't explain why it's expecting a sha... And we should be sending a blank sha if none is saved. Maybe it's somehow doing the same ones more than once?
from wordpress-github-sync.
Related Issues (20)
- Post editing not possible anymore HOT 5
- Document `wpghs_whitelisted_post_types` HOT 6
- Any way to restore content back to Wordpress? HOT 6
- Import from github doesn't update but creates a new page HOT 5
- php error: allowed memory size exhausted HOT 6
- Unable to backup Private Posts? HOT 4
- Permalink url has strange tag HOT 3
- Can't be used in WordPress 4.9.6 HOT 9
- Private Repo? HOT 3
- Can not enable this plugin.
- Auto deletes images
- Class not found? HOT 1
- Export only posts from selected category or sub-categories HOT 1
- Which page on WiKi exactly? HOT 1
- More info
- Semantic linebreaks not working while converting markdown to html HOT 1
- "master" becoming "main" in GitHub causes Not Found error in Github-Sync HOT 3
- No sync
- Documentation on configurations for private repos in organizations (no enterprise) HOT 1
- Export to GitHub not working HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wordpress-github-sync.