2

EE's autosave is not entirely clear in the Docs. Here are the facts:

Autosave (tested versions 2.5.5, 2.6.1, 2.7.2) is on by default. http://ellislab.com/forums/viewthread/222582/#1023950

You can 'disable' it by a hidden config var either in a bootstrap file, to your config or through the CP global vars. Set the value to 0. http://ellislab.com/expressionengine/user-guide/general/hidden_configuration_variables.html#autosave-interval-seconds

In my testing the default is set to 60 seconds. (I haven't searched through the source code, this is from using a stop-watch).

What's not clear in the docs is what triggers an autosave. The timer starts from the moment a value is added to an entry field (Publish/Edit screen). So editing an existing entry does nothing until something has been altered on the page.

To test: edit an existing entry, change the title, wait 60 seconds, autosave posts a message next to the 'submit' button. (in testing changing autosave-interval-seconds to 10, works as expected).

When amending an RTE or WYGWAM field autosave does not execute.

Any help confirming this, help from Ellislab or Pixel & Tonic would be appreciated.

2

3 Answers 3

5

I now have definitive answers. Basically neither works with autosave. EllisLab have noted that their Grid fieldtype doesn't work either.

EllisLab
https://support.ellislab.com/bugs/detail/19838

P&T
Have responded with:

Unfortunately, Wygwam currently doesn't have support for EE's auto-save functionality, but I've added to our list to look into for a future release.

Not ideal but at lease it confirms that they know WYGWAM doesn't work. I've also checked PLAYA and that doesn't work either.

In conclusion, unless you've got a very simple fieldset in EE, autosave won't work.

4
  • 2
    Good sleuthing. Always found it made things more confusing for clients anyway. Especially the 'very hidden' autosave notifications. Oct 25, 2013 at 9:06
  • Agree with you on that. The first implementation was poor, it's got a bit better but needs developing a lot more. It's no excuse though, even if it's poor, something is better than nothing. I've had a client loosing edits. This should work or be removed until it does. Maybe an opening for an Addon? Oct 26, 2013 at 15:22
  • Curious if anyone has tried to integrate the ckeditor "autosave" plugin into wygwam? not as nice as autosaving to the server but could be even better in some situations? Nov 17, 2013 at 1:18
  • Here is the link to the autosave plugin for reference. ckeditor.com/addon/autosave Nov 17, 2013 at 1:19
2

I've tested in in v2.7.1 - Build Date: 20130924

I added a new entry gave it a title and waited. It then said 'autosaved' by the submit button.

I then hit submit and clicked "Edit This Entry" added some text then waited.

Entry then said 'autosaved' by the submit button (I didn't time it but would suggest it was also about 10 seconds).

I then added some more text in a text field waited and it autosaved.

Finally to check I clicked the 'edit' tab and returns to the entries list, found the new entry and saw it had autosaved. I clicked the autosave button and the text I added could be seen.

2
  • Is the issue here that autosave does not appear to work with RTE and Wygwam fields, did you test with either of those Paul? :) Oct 22, 2013 at 10:06
  • That's great, thanks Paul. What fieldtypes were these? I've tested lots of Pixel & Tonic's like Playa, WYGWAM and DimeBar controls and none of them trigger and autosave. Neither does EE's RTE. EE's textarea and title does though. Oct 22, 2013 at 10:06
2

Until we get a better autosave fix from ellislab I went ahead and make a really simple extension that integrates the autosave plugin for CKeditor into wygwam.

The extension uses the ckeditor autosave plugin, which saves the content of the wygwam fields into local storage as you type, and prompts you to import any missing content on pageload.

Hopefully this is helpful to people:

https://github.com/familiar-studio/Wygwam-Autosave

2
  • Great work Keith! I hadn't considered a local autosave option. This is a perfect stop-gap while waiting for EllisLab and P&T to provide a 1st party solution. For reference the plugin autosaves every 25 seconds and keeps the data for 1 day. I've tweaked that to 1 week for my install. It also uses localstorage so latest Browsers only. Nov 18, 2013 at 11:27
  • running ee 2,7.1 and wygwam 2.7.1 with this Wygwam-Autosave extension enabled but I am not seeing any results. Entries are not autosaving. Anyone have a solution to enable autosave? (ref HR) Dec 8, 2016 at 17:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.