grapesjs icon indicating copy to clipboard operation
grapesjs copied to clipboard

Remote load issue

Open matiponce91 opened this issue 9 years ago • 6 comments

Hi, I am working over demo template GrapesJs but I am trying to make a "remote" load so I save a custom template on a json file and this file is what I am trying to load. But the problem is even when the GET of the json is done the template shown in browser is always the default one.

matiponce91 avatar Sep 08 '17 16:09 matiponce91

Are you sure your server outputs a correct and valid JSON? Can you show me the response of your ajax requests?

artf avatar Sep 08 '17 21:09 artf

any update @matiponce91?

artf avatar Sep 21 '17 12:09 artf

Yes I fixed. I discovered that when I manually saved the custom templates in JSON format I did it wrongly. So I found that if saved data is not well saved when loading is done instead of getting an error the default template is loaded.

matiponce91 avatar Sep 21 '17 12:09 matiponce91

Should it be by luck that one discovers a badly formatted JSON? I have an installation that fails to load from a remote endpoint, doesn't report an error, doesn't fire an event!

` storageManager: {

type: 'remote',
stepsBeforeSave: 1,
autosave: true,
autoload: true,
urlStore: host + 'save/',
urlLoad: host + 'load/',
params: {},   // For custom values on requests
// contentTypeJson: true,
storeComponents: false, // Enable/Disable storing of components in JSON format
storeStyles: false,     // Enable/Disable storing of rules/style in JSON format
storeHtml: true,        // Enable/Disable storing of components as HTML string
storeCss: true

}

`

pheeque avatar Oct 01 '17 15:10 pheeque

Hi, I am working over demo template GrapesJs but I am trying to make a "remote" load so I save a custom template on a json file and this file is what I am trying to load. But the problem is even when the GET of the json is done the template shown in browser is always the default one.

Hi Bro Can you share the json response from server ? for remote can you give some example how we need to send response ?

Thanks in Advance

suresh5 avatar Dec 11 '18 11:12 suresh5

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[bot] avatar Dec 11 '19 12:12 lock[bot]