ElkArte Community

Elk Development => Bug Reports => Topic started by: scripple on April 18, 2014, 11:39:24 am

Title: Drafts destroys post
Post by: scripple on April 18, 2014, 11:39:24 am
Was editing a large post in the what files did you edit.  Need to be heading out so I clicked save draft (first time trying to use this feature).  It dropped all the information I had entered since the last time I had previewed the post.  :(
Title: Re: Drafts destroys post
Post by: emanuele on April 18, 2014, 12:11:35 pm
I tried a couple of combinations, but seems to work.
Were you writing in quick reply and hit preview and the continued?
Were you already in reply?
I suppose you have the "automatic save" disabled?
Can you give some more hints on how to reproduce it? ;)
Title: Re: Drafts destroys post
Post by: scripple on April 18, 2014, 06:24:33 pm
I used the normal reply button, not quick reply.  I had been editing the post and had clicked preview a few times and save drafts a few times.  All seemed ok.  Then I made another long edit and had to head out so I clicked save draft and it reloaded saying my draft had been saved but reverted to the last time I had clicked preview.  So all the new edits were lost.

This was the first time I'd ever tried using the draft feature.  I assume autosave is off unless it's on by default.

I was able to recover the post by using back in the browser and cutting and pasting.  Hopefully it's sitting in a draft somewhere.
Title: Re: Drafts destroys post
Post by: emanuele on April 21, 2014, 02:44:00 pm
test pre-preview
another preview
save draft
preview
save draft
no preview but save draft
disabled auto-saving
preview
save
post
Title: Re: Drafts destroys post
Post by: emanuele on April 21, 2014, 02:47:07 pm
preview
save draft
preview
preview
save draft
preview
preview
some text after last preview
save draft
from profile => edit
preview
save draft
save draft
profile => edit
post
Title: Re: Drafts destroys post
Post by: emanuele on April 21, 2014, 02:48:04 pm
Dunno... everything looks fine here...
Are you sure you didn't click "cancel" by mistake on the "you know drafts save only text and subject" warning message?
Title: Re: Drafts destroys post
Post by: scripple on April 21, 2014, 09:37:18 pm
Even if I did click cancel it shouldn't take me to a page with less typed in than I had when I clicked save draft.

But if it's not repeatable I say just drop this until it crops up again.
Title: Re: Drafts destroys post
Post by: Spuds on April 21, 2014, 11:09:35 pm
The only thing I can think of is that one of the async background save calls got really delayed somehow ... like some old auto save came back when you hit save and it used that instead.  I don't know just throwing out an idea.   I can see things getting out of sequence but I don't see that as backing up much in time ... who knows though.  It may be possible to purge any auto saves that are pending once save is hit I guess, have not looked at it at all.
Title: Re: Drafts destroys post
Post by: scripple on April 22, 2014, 12:55:55 am
I really don't know.  I've never looked at how the drafts work.  Only tried them that one time.
Title: Re: Drafts destroys post
Post by: emanuele on December 05, 2014, 06:19:41 am
One random though on that: what would happen in case of multiple tabs?
I mean: