Skip to content

JS error in Tag Manager preview mode #277

@cjriks

Description

@cjriks

In preview mode I get this error in renderPreviewFrame() from the tag manager preview.js:

Uncaught TypeError: document.body is null
renderPreviewFrame https://piwik.ub.uni-duesseldorf.de/piwik/js/container_B4dIhmVH_preview.js:34

Matomo Version is 3.14.1, Browser is Firefox 80.0.1 on OSX. The MTM-Code is added at the top of the <head> tag.

If I edit the preview.js and add a timeout that renderPreviewFrame() is delayed for a second, all is fine. Looks like that the browser needs to long to barse the body so that it is not yet initialized in the DOM when renderPreviewFrame() is called.

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions