Disqus Comment Becomes Untitled After Switching To HTTPS, Here's The Solution
What I mean Disqus comments to be untitled is like the picture above. That is a notification that goes into email if anyone commented on the post. With Untitled then all email notifications from all posts become one.
It happens after the blog switches to HTTPS and occurs in published posts after switching to HTTPS. It should be there post title, so the notification of comments from each post not mixed into one.
Previously I did not think this, I thought maybe this is because the new switch to HTTPS and Disqus has not detected the blog URL changes. But after I read, Disqus will automatically detect the new URL.
But after publishing some new post after switching to HTTPS, Untitled Notifications still occur. Though the Disqus code has nothing changed and before switching to HTTPS does not happen Untitled notifications like this.
Finally I found the solution, if something like this happens, we need to tell Disqus for the post title with this.page.title code.
1. Blog AMP HTML
If you are using a blog with AMP HTML and Disqus comments become Untitled after switching to HTTPS, please replace your blog Disqus comment code with the code below.
<amp-iframe expr:src='"https://cdn.rawgit.com/KompiAjaib/kompi-html/master/ampdisqus_blogger4.html?shortname=Your-Disqus-ID&fontBodyFamily=sans-serif&fontLinkColor=e8554e&canonicalurl=" + data:blog.canonicalUrl + "&title=" + data:blog.pageName' frameborder='0' height='300' layout='responsive' resizable='resizable' sandbox='allow-forms allow-scripts allow-same-origin allow-modals allow-popups' width='600'>
<div aria-label='Disqus Comments' overflow='' role='button' tabindex='0'/>
</amp-iframe>
<div aria-label='Disqus Comments' overflow='' role='button' tabindex='0'/>
</amp-iframe>
Please replace your-disquaIDwith your blog Disqus shortname, adjust sans-serif with your blog typeface, and e8554e please adjust to the color of your blog link.
2. Blog Non AMP HTML
If you use the Non AMP HTML blog and Disqus comments become Untitled after switching to HTTPS, please replace your blog Disqus comment code with the code below.
<div id="disqus_thread"></div>
<script>
/**
* RECOMMENDED CONFIGURATION VARIABLES: EDIT AND UNCOMMENT THE SECTION BELOW TO INSERT DYNAMIC VALUES FROM YOUR PLATFORM OR CMS.
* LEARN WHY DEFINING THESE VARIABLES IS IMPORTANT: https://disqus.com/admin/universalcode/#configuration-variables
*/
var disqus_shortname = "shortname";
var disqus_config = function () {
this.page.url = "<data:blog.canonicalUrl/>";
this.page.identifier = "";
this.page.title = "<data:blog.pageName/>";
};
(function() { // REQUIRED CONFIGURATION VARIABLE: EDIT THE SHORTNAME BELOW
var d = document, s = d.createElement("script");
s.src = "//"+disqus_shortname+".disqus.com/embed.js"; // IMPORTANT: Replace EXAMPLE with your forum shortname!
s.setAttribute("data-timestamp", +new Date());
(d.head || d.body).appendChild(s);
})();
</script>
Please replace shortnamewith your blog Disqus shortname.
The changes will be visible in the new post published after replacing the Disqus comment code. Disqus email notification will return to the post title.
Hope this helps.
0 Response to "Disqus Comment Becomes Untitled After Switching To HTTPS, Here's The Solution"
Post a Comment