Invalid JSON String - Load Data
https://grapesjs.com/docs/modules/Storage.html#setup-the-server
Read full answer below āQuestion
I had some problems loading templates. It did not work both the storage in a .json file and the processing in a mysql database. my loading.php is very simple for testing: <?php $ str = filegetcontents ('database.json'); echo $ str; ?> The string was split into individual characters and packaged in an array. After adjusting the following line everything worked well: grapes.js - line 42667 return this.onResponse (text, clb); to return this.onResponse (JSON.parse (text), clb); I also have the same problem when uploading assets ... here, however, I have not come up with the solution yet.
Answers (3)
I had some problems loading templates. It did not work both the storage in a .json file and the processing in a mysql database.my loading.php is very simple for testing:The string was split into individual characters and packaged in an array.After adjusting the following line everything worked well...
I am not able to load template reply Can you help me with json format how to send ?
Related Questions and Answers
Continue research with similar issue discussions.
Issue #1234
Template Problems with GrapesJS
Some templates just don't load well. Very simple templates do load properly, but there seems to be a problem with templates with more funct...
Issue #597
storageManager: Loading from remote storage
Hi, I'm trying to read the HTML and CSS from my database. When I try to load it into the editor, nothing displays. I can store the data jus...
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 #1442
can't get json data to load.
I'm able to save my json data to the database, but I cannot get the template to load it properly. My json data can be seen here: when I loa...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Check the open-source GrapesJS plugins on GitHub or run a quick search in our free catalog.
Browse free plugins āPremium plugins ship with support, regular updates, and production-ready features ā save days of integration work.
Browse premium plugins āRelated tutorials
In-depth guides on the same topic.
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.