-
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
[Offline Posting] Duplicate posts may appear in the Post List #12800
Comments
Thanks @designsimply, you're right. I'm closing the other issue as duplicate. |
@designsimply ah, I knew that issue seemed familiar but I couldn't find #12164 in my cursory search. Glad someone here has better memory and/or search skills :) @yaelirub Thanks for closing the other one! |
So, I was looking into this yesterday and today morning and I'm pretty sure now that @shiki was correct and this is indeed a Core Data issue, as no duplicate posts get made on the backend. What's going on here, is that sometimes when a post is being uploaded, from the main thread context's point of view, there are suddenly now two posts — with the same contents, but otherwise separate objects. This usually get's fixed on relaunch if the post gets uploaded succesfully, but I also once saw it persist across relaunches. So this screams multi-thread Core Data weirdness to me. I spend some time trying to change the posting logic to change how they handle the multi-threaded nature of them, but mostly made things worse. If I can't make the root-cause disappear by the end of day, I'll write a workaround to just filter out the post in the post list. |
@jklausa I'm not well versed with how Perhaps the deleted revision on this block was not synchronized to the main context right away? WordPress-iOS/WordPress/Classes/Services/PostService.m Lines 270 to 276 in d9d5e90
|
While testing 14.6 beta, I found that duplicates appear in the Pages List as well and when publishing online, particularly, if you use the X at top left to leave a new draft then tap "Save Draft" in the bottom sheet. (1m47s) Tested with WPiOS 14.6.0.1 TestFlight beta on iPhone 6S iOS 13.3.1. @shiki or @leandroalonso, should this note be filed as a separate issue since it's online vs offline and Pages not Posts? |
This bug seems to occur when the device is online as well, using these steps to reproduce:
@shiki or @designsimply do you agree I can add the above to the main issue comment? Would it be appropriate to remove this from offline posting or leave it as-is? |
@guarani I'd say that a new issue for online makes more sense IMHO. Anyway, duplicated posts it's something that I've seen popping up on different occasions and multiple times. :( This one apparently involves the FAB button... so maybe the prev fixes doesn't apply to it somehow? |
+1 to what Leandro said.
I say yes.
I'd say remove it |
I agree with Yael and Leandro. 😄 Thanks, @guarani! |
Thanks for the input, y'all! I've reopened the separate issue, #14572 👍 |
Fixed in #23152 |
Expected behavior
Only one post is shown.
Actual behavior
Two posts are shown. The other one disappears after pulling to refresh.
Steps to reproduce the behavior
It may take a few tries to reproduce the issue.
Tested on iPhone XS, iOS 12.4.1, WPiOS
develop
(d2d9ada)Notes
This may be related to #5364 and #6102.
As far as I can tell, only one post is created on the server. This looks like a Core Data concurrency issue.
The text was updated successfully, but these errors were encountered: