Remote load issue
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.
Are you sure your server outputs a correct and valid JSON? Can you show me the response of your ajax requests?
any update @matiponce91?
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.
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
}
`
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
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.