Post content (partially) lost when "Save Reply" fails due to connectivity issues

When “Save Reply” happens while the internet connection is temporarily down (as just happened to me several times in this train), the content of the post are partially lost.

Steps to reproduce:

  • Start writing a reply.
  • While writing, cap your internet connection.
  • Hit “Save Reply”.
  • Some time later, restore your internet connection.

Expected behavior:
At some point, the “Saving…” process should give up and bring me back to the editor (or at least show a “Cancel” button that does this), so that I can try again to submit my response.

Actual behavior:
The “Saving…” bar at the bottom just sticks around with a spinning circle endlessly. The “expand” button it shows does nothing when clicked. The only thing I can do is to hit F5, which will restore some prior version of the post (not sure if from a local or a server-side cache) – but my last few sentences are lost.

I just had this happen 4 times in a row. At least the last two times I remembered to manually copy the post content before submitting, but that really should not be necessary.

Where are you seeing a “Save Reply” button? I am not aware of any such button in Discourse.

Drafts are saved automatically at regular intervals, provided the content has changed and there is enough content to save, beyond the minimum character limits.

4 Likes

Sorry, it’s called just “Reply”.

I just ran into this again, losing entirely the edits I made to a post because my connection was down when I hit “Save Edit”. Once the connection was back, when I reloaded the page, my edits were just gone. Seemed like when it tried to auto-save on the server there already was no connectivity, and it did not even try to auto-save locally?

Can you describe the time span of this edit in seconds, and how many characters you edited, roughly?

As I mentioned earlier, drafts are automatically saved at regular intervals but it requires a certain duration of editing.

The edit was about adding 2 sentences. Not sure how long that took me, something between 30s and a minute?

So are you saying drafts should be saved locally, in principle? Would it then be possible to trigger another local save just when I press “Save Edit”, to make sure the latest version of saved before irrevocably disabling the editor?

This is still a problem in the latest discourse (well, whatever https://internals.rust-lang.org is using right now): I just made a new post, and due to a bad internet connection it failed to post. It would just spin forever. After a few minutes I hit F5 to unblock that tab, and had to discover that the last ~30s of typing were lost – there was a locally saved draft, but it was outdated.

Shouldn’t it be easy to update the locally saved draft when hitting “reply”? I would appreciate if Discourse could take into account the needs of people with poor internet connectivity. Currently, this is an area where old forums such as phpBB3 are doing much better than Discourse.