I have a Disqus installation on my D8 website which works fine, until I enable BigPipe. Then the comments don't load (only the field label does). Am I missing something?
Thanks!
Tal
I have a Disqus installation on my D8 website which works fine, until I enable BigPipe. Then the comments don't load (only the field label does). Am I missing something?
Thanks!
Tal
Comments
Comment #2
Anonymous (not verified) commentedI used to have same issue. But only when logged in. (Guess that's when BigPipe is active)
But have you updated to the lastest version? I don't have any trouble with the latest version.
Comment #3
valante commentedDoes "latest" mean dev? I have the last non-dev version.
Comment #4
Anonymous (not verified) commentedOkay the problem came back to me. :(
Comment #5
Anonymous (not verified) commentedOK. This problem is actually reproducible.
1. Login
2. Enable Big Pipe.
3. Refresh the page where disqus is used. -> Disqus does not load.
4. Uninstall Big Pipe.
5. Refresh the page where disqus is used. -> Disqus loads normally.
Note that in step 3 (when Big Pipe is enabled), the response HTML contains the disqus field.
The difference is when Big Pipe is not enabled, Disqus will attach an
<iframe>to the<div id="disqus_thread">.And even when Big Pipe is enabled, the Disqus field is NOT delivered by Big Pipe.
My guess is: the Javascript of Big Pipe conflicts with the Javascript of Disqus. Although I still need to investigate further.
Comment #6
Anonymous (not verified) commentedAnother discovery:
When Disqus does not load. Run the javascript code in the console manually: (note that
disqus_shortnameshould be replaced with your actual shortname)This piece of code is inside disqus.js that the Disqus module loads, it basically loads the javascript from disqus.com.
And the comment will load.
When BigPipe is enabled, it seems that this piece of code is not executed, and therefore the comments do not load.
Maybe we should start an issue for the Disqus module.
Comment #7
Anonymous (not verified) commentedI've created an new issue in Disqus: #2691401: Disqus module not working with BigPipe
Comment #8
wim leersComment #9
wim leersThe Disqus module is poorly written. It does this:
… but when BigPipe is enabled,
drupalSettings.disqusis only set later. This would also be the case if the part of the page containing Disqus comments is loaded via AJAX — this is not a BigPipe-specific problem.So, the conclusion is simple: the Disqus module's JS needs to be fixed.
I'll cross-post this to #2691401: Disqus module not working with BigPipe.
Comment #10
wim leers