Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Autosave with remote storage doesn't send network requests #1985

Closed
DylanSp opened this issue Apr 26, 2019 · 4 comments
Closed

[BUG] Autosave with remote storage doesn't send network requests #1985

DylanSp opened this issue Apr 26, 2019 · 4 comments

Comments

@DylanSp
Copy link

DylanSp commented Apr 26, 2019

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.

@DylanSp
Copy link
Author

DylanSp commented Apr 26, 2019

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

@artf
Copy link
Member

artf commented Apr 30, 2019

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

@artf artf added the bug label Apr 30, 2019
@artf artf closed this as completed in eb20897 May 1, 2019
@DylanSp
Copy link
Author

DylanSp commented May 6, 2019

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

@lock
Copy link

lock bot commented May 5, 2020

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot added the outdated label May 5, 2020
@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants