Describe the bug
TypeError: can't access property "appendChild", a is null;
This is the error that shows up when I try to preview my blog posts on the admin after embedding Disqus for comments on the blog pages.
To Reproduce
Embed Disqus with gatsby
Expected behavior
To be able to preview my posts as I am making changes to them on the admin end.
Screenshots
Applicable Versions:
[email protected]git-gatewayMozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Firefox/78.0CMS configuration
```
publish_mode: simple
slug:
encoding: unicode
clean_accents: false
sanitize_replacement: "-"
backend:
name: git-gateway
branch: master
commit_messages:
create: Create {{collection}} “{{slug}}”
update: Update {{collection}} “{{slug}}”
delete: Delete {{collection}} “{{slug}}”
uploadMedia: "[skip ci] Upload “{{path}}”"
deleteMedia: "[skip ci] Delete “{{path}}”"
media_folder: static/img
public_folder: /img
collections:
...
@Dendekky You will have to hide the Disqus component for the CMS preview. Other users have reported the same, for example https://github.com/netlify/netlify-cms/issues/3757#issuecomment-628978600
Closing as duplicate of #3757
Okay.
Thanks.
Will there be a solution to this later though?
Will there be a solution to this later though?
The Disqus component is trying to append a script to window.document.body hence the error as the cms preview is loaded inside an iframe. For now just hide the component.
Most helpful comment
@Dendekky You will have to hide the Disqus component for the CMS preview. Other users have reported the same, for example https://github.com/netlify/netlify-cms/issues/3757#issuecomment-628978600