Contentful logo

Contentful Community

Lack of Save Buttton on Entry Edit Page

Hi Contentful Conteful :slight_smile:

W e chose Contentful as our CMS and as we are advancing in our usage of this tool we start seeing a few things that would be great to have. I want to share one of them with you in this post and hopefully hear some feedback about why we don’t have it or if we are going to have it soon.

I am aware that Entities are saved through Auto Save for each change the user does and that the Entry.AutoSave Webhook is triggered every 20 seconds. That is great, I understand the idea of avoiding loss of data.

But for some reason the Save button had to be removed in the process. I guess the idea was: if you keep the save button, the users will not trust or expect the Auto Save functionality and they will always click on the Save button.

One of the problems with this approach is: obviously Contentful is not the only one worried about having the last version of the Content, most of the systems who integrate with Contentful will also have to keep track of the last version of what Contentful has in its side. Then there is nothing else to do than trust the Entry.AutoSave Webhook, which is only triggered every 20 seconds or when the page closes/reloads (which fails some times, for unknown reasons), anyway this is one of the problems that we face:

We need to do translations of the content, and we use another API for that, we need a much more robust translation system than what Contentful offers at the moment.

After we receive the source texts from the entry that the user is updating and then send it to another API. For making sure that the user understand what is happening, we created a “status” field in each entry that has fields which require translation and our system update the value of this field in Contentful for confirming that everything went well in our system’s side.

After this long explanation here is the problem: either the user is forced to wait 20 seconds staring at the screen for having the Entry.AutoSave Webook triggered or the user has to reload the page and hope that the Webhook is triggered or maybe the user closes the page and come back to see if the status field is filled. This problem would not exist if we had the “Save” button which always would trigger the Entry.Save Webook.

My suggestion is that Save button should exist together with the AutoSave. If Save is clicked, the AutoSave count down should be restarted and, of course, the AutoSave should be triggered in case the page is reloaded or closed.

2 Likes

Hi @josegomes!

The save webhook is triggered when you make an API call to edit or update an entry. The autosave event is triggered when using the webapp to edit or update. That is the major difference between save and autosave.

When using the webapp, the webhook fires immediately after the autosave happens and is not necessarily limited to once every 20 seconds. I’ve often seen the webhook firing within a second or 2 of editing the entry.

Alternative - make your own save button with a sidebar UI extension

If the webhook system doesn’t work the best for you, another option would be to build a sidebar UI extension that shows a save button (or maybe call it translate) that when clicked sends the entry to your translation API. Then when your translation API is finished it can make Contentful Management API calls to update the entry with the translated content.

Hope this helps!

Hi I’m curious if there were any updates on this topic. I’m building a custom save button for a ProductPage content_type. It has a bunch of linked content that we want to make changes to but not publish, then hit the custom Save Button to trigger a “update” action (I’m assuming this is what I want to trigger but not sure), that will trigger a webhook listening for the “save” action. This then invokes an AWS Lambda that reads from the Contentful Preview API to write HTML pages to S3 for preview in our staging environment.

My question is I see methods such as extension.space.updateEntry which I’m trying to use to update the ProductPage content_type in order to trigger the webhook. Not sure if this is the write approach / method as every time I call the updateEntry method with the sys.id and sys.version of the entry I would like to update I get a 500.

Any ideas of if this is the correct approach. Seems confusing because the extension Object passed to the callback to the init function has methods that are slightly different than what is listed in the CMA SDK docs so it’s a bit confusing what to do

https://contentful.github.io/contentful-management.js/contentful-management/5.4.0/index.html