Disqus Error/Status Code: 404

Topics: ASP.NET 2.0, Business Logic Layer, Controls, Themes
Feb 10 at 3:25 PM
Hi,
I manage comments by Disqus. I did a speed test on my site with WebPagetest and I marked in red Disqus.com get_num_replies.js with Error status Code 404

Does anyone know what it means or has already had this error in the past?

Thanks
Fabry

This is the code
URL: http://disqus.com/forums/Informarea/get_num_replies.js?url102=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3Dd770956a-81df-44b9-bb81-989ea28cf534%23disqus_thread&url109=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D374014d5-b276-4fe2-a5b2-dd3a133b5a25%23disqus_thread&url116=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D4dfdfd08-3876-4ca2-a300-2025db21c565%23disqus_thread&url123=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3Db26bd599-249f-4440-8370-606cff36818a%23disqus_thread&url130=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D984b2f96-491a-404c-be26-38e00aa2ee93%23disqus_thread&url137=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D5016807f-4202-48e3-b77b-44dba24f7295%23disqus_thread&url144=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3Dfc8767fd-991b-41a7-849a-06bf0e84596d%23disqus_thread&url151=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3Dacaaa5c1-df75-4053-8c0f-ec7e96857a9f%23disqus_thread&url158=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3De109fb60-30bf-4eee-9d89-5d1d2dfcaa8c%23disqus_thread&url164=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D2d4df9d0-a5c8-4ef6-bcc5-596b4f80dbc8%23disqus_thread&url170=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D9583f1d4-94e5-439a-9e11-c3faaad4512c%23disqus_thread&url176=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D98ed00fd-7a16-485b-ad05-cd707954b47f%23disqus_thread&url182=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D7f60fb21-b27f-4689-bffa-4e0c76119bcc%23disqus_thread&url188=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D6f1a8003-7382-4748-b6fc-b043942a5c55%23disqus_thread&url194=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D197138cd-7c57-4721-9641-d74975cfae0f%23disqus_thread&url200=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D94de62ca-b691-4913-8a2f-90485f53490e%23disqus_thread&url206=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D0b9285e8-4346-4cdd-923b-9da7264c86a4%23disqus_thread&url212=http%3A%2F%2Fwww.informarea.it%2Fpost.aspx%3Fid%3D353d6a51-ca27-44ca-9827-1e95dd912792%23disqus_thread&
Loaded By: http://www.informarea.it/:1649
Host: disqus.com
IP: 23.235.37.134
Error/Status Code: 404
Priority: Medium
Client Port: 59022
Request Start: 2.376 s
DNS Lookup: 39 ms
Initial Connection: 32 ms
Time to First Byte: 171 ms
Content Download: 4 ms
Bytes In (downloaded): 1.7 KB
Bytes Out (uploaded): 2.3 KB
Feb 11 at 10:46 AM
I think it's a common mistake to all those who use Disqus for BlogEngine, because is an error of URL, it's explain here

Disqus error get_num_replies.js

Problem isn't simple to correct because i must to change Helpers.cs in Source BlogEngine.Core/Web

Someone else has had the same problem?

Fabry
Feb 11 at 11:05 AM
Solution is change
 public static void AddTrackingScript(System.Web.UI.Page page)
        {
            var sb = new StringBuilder();

            if (BlogSettings.Instance.ModerationType == BlogSettings.Moderation.Disqus)
            {
                sb.Append("<script type=\"text/javascript\"> \n");
                sb.Append("//<![CDATA[ \n");
                sb.Append("(function() { ");
                sb.Append("var links = document.getElementsByTagName('a'); ");
                sb.Append("var query = '?'; ");
                sb.Append("for(var i = 0; i < links.length; i++) { ");
                sb.Append("if(links[i].href.indexOf('#disqus_thread') >= 0) { ");
                sb.Append("query += 'url' + i + '=' + encodeURIComponent(links[i].href) + '&'; ");
                sb.Append("}}");
                __sb.Append("document.write('<script charset=\"utf-8\" type=\"text/javascript\" src=\"http://disqus.com/forums/");
                sb.Append(BlogSettings.Instance.DisqusWebsiteName);__
                sb.Append("/get_num_replies.js' + query + '\"></' + 'script>'); ");
                sb.Append("})(); \n");
                sb.Append("//]]> \n");
                sb.Append("</script> \n");
            }
Remove
disqus.com/forums/
and put after sb.Append(BlogSettings.Instance.DisqusWebsiteName);
sb.Append(".disqus.com");

For example
http://informarea.disqus.com/get_num_replies.js

SO WORK...... (I must to test this evening in my site)
Bye
Fabry