BUG: JSON.stringify(this.editor.getComponents()) Error
Question
Version: 0.16.44
Hi there! I have remote storage for pages, and recently I faced an issue when saving page, JSON.stringify(editor.getComponents()) started to throw error Uncaught TypeError: e[M].getId is not a function.
I investigated the already saved JSON representation of the page and found out that it fails on this part
[
{
"tagName": "form",
"type": "form",
"attributes": {
"method": "POST",
"id": "form-id"
},
"components": [],
"__symbol": "if5s0j"
}
]
I don't know what's the purpose of the __symbol key, but without it, everything works fine.
This issue occurs only on few pages, but I'm afraid that it might happen again on other pages.
Answers (3)
Same error here ... do you have a solution?
[EDIT] Downgrading seems to be the only solution for now
Same problem here, if I preprocess the components and remove that attribute (__symbol) before load the Editor the template works fine.
Is the a way @artf to disable the symbols for now?
Yeah unfortunately the previous version of grapesjs had a bug that created symbols involuntary. In the current version, the bug is fixed and symbols are disabled, but unfortunately, this still happens if you try to load a component with a saved symbol reference (created by the bug).
I'll add a patch for this issue in the next release, for now, I'd follow Josè's advice and remove all __symbol references before loading the editor.
Related Questions and Answers
Continue research with similar issue discussions.
Issue #2637
[Bug]: Preview mode & automatic components borders toggling
Hello again :) Our team recently started customising the editor & removing the webpage preset, and we might have found some bugs related to...
Issue #3075
BUG: Unhandled Rejection (TypeError): i.classList is undefined
Hi. I updated GrapesJS to its current version 0.16.22 and I get an error on the callback function: editor.on("component:add", (model) => {...
Issue #2974
BUG: Hover editor result in TypeError: this[0].getAttribute is not a function
Version: "0.16.18" Are you able to reproduce the bug from the demo? Yes Describe the bug detailedSet the padding for the body inside the if...
Issue #1614
[Bug]: adding css variables as style manager property
trying to add css variable to style manager causing error: Uncaught TypeError: Cannot read property 'toUpperCase' of undefined fiddle Am i...
Paid Plugins That Match This Issue
Curated by issue keywords and label relevance to help you ship faster.
Loading paid plugin recommendations...
Browse Plugin Categories
Jump directly to plugin category pages on the marketplace.