Edited material disappears when Save is clicked

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

Edited material disappears when Save is clicked

Post by accampbell »

If I pause too long while editing a post and then click Save, everything just disappears and all my work is lost. I seem to remember that this was something you could configure but I don't seem able to find it. Very annoying when it happens. Any way to avoid it?
Anthony Campbell
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Edited material disappears when Save is clicked

Post by Timbalu »

Well, this is what DRAFT could be used for... :)

In your backends personal preferences form, you are able to activate the automatic saving in the "Default setting for entries" section with the "Enable autosave-feature" option.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

Re: Edited material disappears when Save is clicked

Post by accampbell »

I already have autosave activated but it doesn't seem to be working. Does it only work jn draft? Anyway, I don't understand why Save seems to be doing the opposite of what it says, i.e. deleting all the text I've written.
Anthony Campbell
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Edited material disappears when Save is clicked

Post by Timbalu »

Just to be clear. Autosave is build in now. Do not use the autosave plugin any more!
accampbell wrote:Does it only work jn draft?
No, it works for publish forms too.

Do you have any browsers console js error messages?

Please try to upgrade to current Serendipity 2.0.2.
There was something fixed with localStorage, which could be related...

When you say "..deleting all the text I've written", does this mean, submitting the form did nothing and did not give you a message or such?

Do you use the PLAIN entry FORM or the WYSIWYG Editor (CKEditor) - and if the latter, the default built-in package or via the CKEditor plugin? (I think I have an idea why it might not work.)
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

Re: Edited material disappears when Save is clicked

Post by accampbell »

I'm not using the autosave plugin - just the builtin autosave. I don't use the WYSIWYG editor.
No error messages that I've seen.

If I keep saving the text frequently it's OK. If I stop to think too long and then click Save, the entry I've been working on disappears (I don't see "Your entry has been saved". If I then try to edit it again, all the recent work has vanished.

The problem has existed for some time but I tended to work round it unconsciously, by frequent savings.

Incidentally, the same thing happened to my wife, whom I'd just enabled as a user (she wasn't pleased). This was on a different computer (Mac) so it's something in the blog software, not my computer.

Actually, I'm wondering if it is the autosave that's doing it. I've turned it off to see if it helps.

I'll try an upgrade later.
Anthony Campbell
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Edited material disappears when Save is clicked

Post by Timbalu »

accampbell wrote:If I keep saving the text frequently it's OK. If I stop to think too long and then click Save, the entry I've been working on disappears (I don't see "Your entry has been saved". If I then try to edit it again, all the recent work has vanished.
Well, this is a default behaviour that has always existed, AFAIK. If you wait too long, your Session expires and/or connection is interrupted, and your entry is sent into the Nirwana. Strange is, that it doesn't give you an error or notice message though.

The PLAIN Editor form should work with autosave, which javascript parts are inside the serendipity_editor.js in your source code. (I can not confirm this myself, since I never use it.)
If your browser console does not give you any errors about this file not working, I assume this can "only" be a matter of a not allowed IndexedDB usage in your browser by the browser itself or a browser plugin.
https://developer.mozilla.org/en-US/doc ... _IndexedDB
This docu includes some scripts you may try to include to the Serendipity Backend in the /templates/2k11/admin/index.tpl file, checking your browsers support for this Storage solution.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

Re: Edited material disappears when Save is clicked

Post by accampbell »

It looks as if the "default behaviour" is what is doing this. But how long is too long? It would be useful if it were configurable.

The reason I queried Autosave is that when I made a Test post just now and saved it, the text I'd written there appeared in the next New entry. After turning off Autosave this didn't happen. I'll keep it off for a bit and see how it goes.
Anthony Campbell
Timbalu
Regular
Posts: 4598
Joined: Sun May 02, 2004 3:04 pm

Re: Edited material disappears when Save is clicked

Post by Timbalu »

accampbell wrote:I made a Test post just now and saved it, the text I'd written there appeared in the next New entry.
This should not happen. We had this once and then added some clear cache voodoo, I think. Try the upgrade.

Btw, I don't think "default behaviour" is meant being specific to S9y only - it has to do with connections between client author sessions and remote form request listeners.
Regards,
Ian

Serendipity Styx Edition and additional_plugins @ https://ophian.github.io/ @ https://github.com/ophian
accampbell
Regular
Posts: 138
Joined: Fri Jun 09, 2006 8:59 pm
Location: London, UK
Contact:

Re: Edited material disappears when Save is clicked

Post by accampbell »

I upgraded S9y at the weekend and so far editing seems to be OK. I haven't enabled autosave, however.

I take your point about the default behaviour not being specific to S9y; I've no idea what specificies it.
Anthony Campbell
Post Reply