BUG: Parser bug inside Remix
Question
GrapesJS version
- I confirm to use the latest version of GrapesJS
What browser are you using?
Chrome v114
Reproducible demo link
https://github.com/wunksert/remix-grapes-error/tree/main
Describe the bug
How to reproduce the bug?
-
Clone repo above
-
npm i
-
npm run dev you'll see that the grapes iframe and boilerplate is rendered into the canvas.
-
Try to export and you'll see that all the grapes boilerplate is also rendering into the canvas
-
Open dev tools and you'll see the error:
Component.ts:910 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'querySelector')
at o2.getBody (Component.ts:910:16)
at o4._upFrame (sample.js:20:20)
at min.js:12:54
at Array.forEach (<anonymous>)
at o4.toggleVis (min.js:12:21)
at o4.run (max.js:13:7)
at e3.callRun (ShowOffset.ts:16:26)
at o2.runCommand (index.ts:805:3)
at n2.updateActive (PropertyFactory.ts:421:47)
at g (backbone.js:482:10)
Additional context
What is the expected behavior? The editor should render it's boilerplate properly, the same way as it
What is the current behavior? The parser doesn't seem to work. The editor renders the iframe that's meant to encapsulate the editor DOM. It also exports all the grapesJS boilerplate.
If is necessary to execute some code in order to reproduce the bug, paste it here below:
Code of Conduct
- I agree to follow this project's Code of Conduct
Answers (3)
@wunksert it seems like the editor initializes on itself multiple times, are you properly clearing the editor instance with destroy (eg. in your useEffect)?
It might turn out that a fix for this is more simply solved by me editing structure or naming conventions in my project. Happy to do that if it's faster than changing something in GrapesJS core.
yeah definitely not related to the core
Related Questions and Answers
Continue research with similar issue discussions.
Issue #5729
BUG: editing/replacing the text inside of a link
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v122 Reproducible demo link https:/...
Issue #5320
BUG: Upload Image or Asset is not triggering on File/Image selection
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Chrome v114 Reproducible demo link none De...
Issue #5263
BUG: Deleting a component without deleting its corresponding style, will adding new components later cause style conflicts?
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? latest version of Chrome Reproducible demo...
Issue #3860
BUG: blocks not working after upgrading from 0.16.27 to 0.17.27
GrapesJS version [X] I confirm to use the latest version of GrapesJS What browser are you using? Firefox 93.0, Chrome 94.0.4606.71 Reproduc...
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.