Support » Plugin: Disqus Comment System » JavaScript ERROR site wide

  • JavaScript error is thrown on any page or post type that does not include comments.

    embed.js:39 Uncaught TypeError: Cannot read property 'appendChild' of null
        at k (embed.js:39)
        at Object.l [as isSerif] (embed.js:39)
        at h.i.toJSON (embed.js:39)
        at Object.c.loadEmbed [as _loadEmbed] (embed.js:41)
        at embed.js:41

    The issue is that you are loading your javascript assets every time and anywhere. You should only enqueue your files when the actual IFRAME rendering is called.

    In other words, only use wp_register_script() on hook wp_enqueue_scripts and user wp_enqueue_script right before you are actually going to echo or render the iframe.

    The page I need help with: [log in to see the link]

  • The topic ‘JavaScript ERROR site wide’ is closed to new replies.