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

Draft post not published after "Publish" on update saved toast #19540

Closed
thehenrybyrd opened this issue Oct 31, 2022 · 4 comments
Closed

Draft post not published after "Publish" on update saved toast #19540

thehenrybyrd opened this issue Oct 31, 2022 · 4 comments

Comments

@thehenrybyrd
Copy link
Contributor

thehenrybyrd commented Oct 31, 2022

Expected behavior

After updating a Draft post, a toast pops up to say "post draft uploaded".
I expected that tapping "publish" on the toast would publish my post.

Actual behavior

Tapping "publish" on the toast produces a "post published" toast (though loading indicator is shown).
However, the post is not in fact published. "Update" still appears in the top-right corner, and the post still appears in the Drafts list.

Steps to reproduce the behavior

  1. Make a new draft post, then exit the post.
  2. Reopen that draft post, and make some changes.
  3. Tap "Update" in the top-right corner.
  4. Note the "Post draft uploaded" toast, and tap "Publish" on that toast.
  5. Note there is no loading indicator, but wait a few moments and a new toast appears.
  6. Note the "Post published" toast.
  7. Note that "Update" still appears in the top-right corner, and "Publish" still appears within the kebab menu.
  8. Tap "X" to exit your post. (You can discard changes or not, doesn't effect the bug)
  9. Refresh the posts list. Note that your post still appears in the Drafts list. It is not published.

You can repeat this as many times as you like. The Draft will only be published if you tap the settings kebab and "Publish" to prompt the publish flow.

draftnotpublished.mp4
Tested on iPhone 12 mini, iOS 15.7, WPiOS 20.9

Found during usability exploration: pdcxQM-1ff-p2

@fluiddot
Copy link
Contributor

Thanks @thehenrybyrd for creating the issue 🙇 !

I noticed that after tapping the Publish button within that toast, the post is actually being published if you check the published posts in the dashboard via the browser. Nevertheless, as you described in the issue, in the app the post remains displayed as a draft and warns about local changes. I haven't explored further the cause but looks like the editor might mark the post automatically as drafted (maybe due to the autosave logic 🤔 ) after tapping the Publish button, which would explain why warns about local changes (it was published and now drafted). In fact, if you update the post and quickly close the editor while the Post draft uploaded toast is still visible, and then tap the Publish button, the post gets published successfully.

As a next step, we'd need to debug the editor while publishing a post following the steps outlined in the issue, in order to identify the culprit.

@thehenrybyrd
Copy link
Contributor Author

I noticed that after tapping the Publish button within that toast, the post is actually being published if you check the published posts in the dashboard via the browser.

Oh, interesting! And then (I presume) it gets put back as a draft?

I think your thought about the autosave logic is a good place to explore; I wondered the same thing, because it looked like it should be published but that got interrupted somehow.

@fluiddot
Copy link
Contributor

fluiddot commented Nov 2, 2022

Oh, interesting! And then (I presume) it gets put back as a draft?

Yep, but only if you update the post in the app after tapping the Publish button within that toast. In fact, the post status (Draft status) is the modified change warned with the message `Local changes".

@kean
Copy link
Contributor

kean commented May 1, 2024

This snackbar was removed in 24.9, so it no longer applies.

@kean kean closed this as completed May 1, 2024
@github-project-automation github-project-automation bot moved this to Done (keep clean, manually) in Mobile Gutenberg Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done (keep clean, manually)
Development

No branches or pull requests

3 participants