0

Looking for a way to actually save nodes every x seconds when creating or editing.

I am aware of the Autosave module, which is a great module but it only saves the forms on clientside and has quite it's issues and conflicts with several other modules on my website (jQuery Update, Drag 'n' Drop Upload,...)

So basically I'm looking for a way to save a node automatically in the drupal system, even when creating a new one. Some sort of "draft" function like Gmail uses for unfinished mails.

I think the best shot is to use an ajax script which runs every x seconds, but have no idea how to get it into the database...

Anyone who is aware of a similar module or could point me in the right direction how to achieve this?

0

I'm unaware of any existing production/beta modules with this functionality.

There's an old blog post available from 2014 that discusses the use of GarlicJS to save the current working version of the Drupal node you're working on in browser local storage:

https://www.shooflydesign.org/buzz/lightweight-autosave-for-drupal-with-garlicjs

Quote:

Garlic uses HTML5 local storage, supported by all browsers these days, to cache what you're writing as you write it. I like this solution because, unlike WordPress, it doesn't create a bajillion post revisions. The values are stored by your browser until your submit the form, at which point they're cleared out.

If you're open to updating to Drupal8 (likely not, I realize), then there's a new module available called AutoSave_Form that claims to do something similar to what you're asking for:

https://www.drupal.org/project/autosave_form

Quote:

The autosave form module comes with a configuration form, which could be found under Admin->Configuration->Content->Autosave Form. There the interval could be easily adjusted and decide whether autosave is turned on for content or config entity forms or for both. By default it is active only on content entity forms and currently it is being tested only with content entity forms. If support for config entity forms is required please feel free to open an issue if you find some bugs regarding config entity forms.

At the moment the autosave works only for entity forms, but it will be extended to cover regular forms as well.

| improve this answer | |
  • Thanks for your answer. I found the post about GarlicJS too but it also has the same "problem" that it saves in browsers local storage. I am indeed not thinking about upgrading to D8, as a lot of contrib modules are still not ported. In the meantime I digged a little bit further and it seems that there is no "easy" way to achieve this. It seems a lot of work for this little feature. – Apoc Sep 14 '18 at 16:36
  • @Apoch8000 Agreed, it seems quite the task. – theta-fish Sep 14 '18 at 20:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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