Skip to main content
Topic: Too many drafts (Read 2362 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Too many drafts

I think this can be considered a bug, at the moment, it seems that in certain conditions, when you post a new topic, or a reply, or something, the draft of that message is not deleted if auto-saving of drafts is on.

I'm not sure how to reproduce it actually... :-\
Bugs creator.
Features destroyer.
Template killer.

Re: Too many drafts

Reply #1

Yup, drafts can be like that  :P   I'll troll the code again and see if something jumps out and goes boo !

Quick question, on QR, do you use the full editor or just the text box?

Re: Too many drafts

Reply #2

I experienced this too.  :-[

Re: Too many drafts

Reply #3

Quote from: Spuds – Quick question, on QR, do you use the full editor or just the text box?
Textbox.
You know I'm old style! :P
Bugs creator.
Features destroyer.
Template killer.

Re: Too many drafts

Reply #4

Well I found one way to do this ...

If you use QR and enter a response (short and fast) and hit post before the first autosave, ever fires, then the id_draft is not updated in the form.  However pressing "post" fires the autosave since the editor looses focus so the draft is saved the form submitted with no draft_id yet so it saves the post and the draft.

Re: Too many drafts

Reply #5

Race, race, race! YAY! :P

ETA: oh... and now that I think about it, that's not unusual for me, because I type the answer, hit "tab" and "enter", that means start autosave, start post. I did it without even realizing with that very post... lol
Bugs creator.
Features destroyer.
Template killer.

Re: Too many drafts

Reply #6

Yup two conditions, the before first draft save event ... that's almost guaranteed to save and not delete.  Then we have the race condition where you have an autodraft saved and hit post, now its a race where the post event wants to delete the draft and the autosave wants to save a new one, which wins :P

Trying some different things to tie in to the form submit.

Re: Too many drafts

Reply #7

Worst case: a scheduled task that checks if you posted anything with the same text... ugly?
Bugs creator.
Features destroyer.
Template killer.