Issue #1985Opened April 26, 2019by DylanSp1 reactions

[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)

DylanSpMay 6, 20191 reactions

Updating to the next release fixed this, I now see requests to to the /store endpoint. Thanks for the prompt fix!

DylanSpApril 26, 20190 reactions

I should also note that manually saving with editor.store() does send a request that I can see in the Network tab.

artfMay 1, 20190 reactions

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.

Paid Plugins That Match This Issue

Curated by issue keywords and label relevance to help you ship faster.

View all plugins

Loading paid plugin recommendations...

Browse Plugin Categories

Jump directly to plugin category pages on the marketplace.