-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Some posts with local changes are never uploaded. #12000
Comments
/cc @wordpress-mobile/ravenclaw @maxme - Can I ask you to provide some insights on what Android does? This could be useful to implement something similar in iOS. |
Sorry I just noticed your ping here. In wpandroid, we don't check for failed uploads. We list post with local modifications (currently we do only this only for drafts, but this should be extended to any post status). The logic is described there. You'll notice some extra checks (is the post publishable? is the post being uploaded? etc.) |
I'm starting to think that it may make sense not to auto-upload posts when there was no explicit request by the user to "save" the changes. The reason is that to do this properly, we'd need to:
It is my understanding that auto-uploading would ONLY be useful in the case where the post was and still is a Draft (which is something we need to be able to verify somehow). Also, some related discussion in Android here: wordpress-mobile/WordPress-Android#10021 (comment) /cc @malinajirka since you may have some thoughts about this. |
I created this table yesterday, which might be useful - the comment seems more complicated than it actually is wordpress-mobile/WordPress-Android#10174 (comment) I agree this solution doesn't cover the following scenario
This issue has two solution imho
This is basically what Diego proposed |
I'm closing this issue as we shouldn't auto-upload posts that didn't receive confirmation to do so by the user. |
Expected behavior
Posts with local changes are uploaded when you have a connection.
Actual behavior
If, while you're in the editor with local changes, you force the App to close (without really closing the editor first), when you open the back again, you can see a post with local changes that is never uploaded.
Steps to reproduce the behavior
If, while you're in the editor with local changes, you force the App to close, when you open the back again, you can see a post with local changes that is never uploaded.
More information:
This probably happens because the PostCoordaintor currently looks for failed posts only:
WordPress-iOS/WordPress/Classes/Services/PostCoordinator.swift
Lines 250 to 260 in 8dea912
Failed posts are posts that we attempted to save / upload, but that failed due to not having connectivity.
We need to improve this logic someway to include any posts with local changes (but we also need to make sure this is not triggered for posts that are currently being edited).
We should also consider what to do with published posts and scheduled posts with local changes.
Tested on iPhone XS, iOS 12.3.1, WPiOS 12.7 (DEV)
The text was updated successfully, but these errors were encountered: