[BUG] Autosave with remote storage doesn't send network requests
Question
OS: Windows 10
Browser: Chrome 73
GrapesJS version: 0.14.57
I have remote storage configured using this call to grapesjs.init():
const editor = grapesjs.init({
container: editorRef.current,
storageManager: {
autosave: true,
type: "remote",
urlStore: "/store",
urlLoad: "/load"
}
});
While I see the request to /load fire in the Network tab of Chrome's dev tools, I don't see any requests to /store, no matter how many changes I make in the editor. Is there a configuration option I'm missing, or something simple like that? I'm using Grapes inside React, using create-react-app; could that cause an issue?
I can replicate this on CodeSandbox.
Answers (3)
Updating to the next release fixed this, I now see requests to to the /store endpoint. Thanks for the prompt fix!
I should also note that manually saving with editor.store() does send a request that I can see in the Network tab.
Thanks for the report @DylanSp actually there is an issue with the listener. If the first load call fails (and I guess your /load endpoint is fake just like mine) it never starts tracking the editor changes so autosave doesn't work. It will be fixed in the next release
Related Questions and Answers
Continue research with similar issue discussions.
Issue #873
[Need help]: After using urlLoad from storage manager impossible to change component with Traits
Hello, I am save template to db and after loading from db impossible to change component with Traits. Video example on countdown: https://y...
Issue #4370
BUG: LayerManager becomes unresponsive after StorageManager.load()
GrapesJS version[X] I confirm to use the latest version of GrapesJSWhat browser are you using? Chrome 102Reproducible demo link https://cod...
Issue #1429
Empty content when load from remote storage if components array is not empty
I have problem loading stored remote content into the editor when the JSON contains non empty gjs-components My JSON data looks like this w...
Issue #384
Create and Edit Template into Database
This is my code to Create a new template and insert the inline html with style into the database : I am able to insert the template-data in...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.