Support Forums

Support Online : Mon - Fri / 10am - 6pm (GMT +6)

Your Time: Our Time:

Disqus K2 Joomla 1.7 comments don't work

Featured Lock Resolved
When I click on the comments link at the bottom of an article I get the following message.

We were unable to load Disqus. For more information please see our documentation on identifier and urls.
blog comments powered by Disqus

Comments were working with SuperBlogger on this disqus domain earlier before I moved to K2. In troubleshooting it I see that my disqus url is relative.

SP Comments:

* var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread]
*/
var disqus_developer = "1";
var disqus_url= "index.php?option=com_k2&view=item&id=573&Itemid=94";
var disqus_identifier = "09f9b0238d96c8d4a3af8ede0c3213ce";


SuperBlogger

var disqus_url= "http://grantmcwilliams-test.com/food/562-irish-people-reviewing-french-food-is-always-good-for-a-laugh";
var disqus_identifier = "4b8ace552e_id562";


Is there a misconfiguration on my new site somewhere that only puts the relative path in _path or is this a problem with SP Comments?

16 Answers

Kawshar Ahmed - Senior Staff

More than a month ago #Permalink
If you work in live server then you need to disable developer mode.

Grant McWilliams

More than a month ago #Permalink
That made no difference. Now it looks like this.


var disqus_url= "index.php?option=com_k2&view=item&id=573&Itemid=94";
var disqus_identifier = "09f9b0238d96c8d4a3af8ede0c3213ce";
var disqus_config = function () {

Kawshar Ahmed - Senior Staff

More than a month ago #Permalink
Can't help you without seeing the problem live.

Dima

More than a month ago #Permalink
Disqus does not work. :( No comments block itself, all that is written:blog comments powered by Disqus
Help, please! Here is an example: http://beautyton.ru/iskusstvo/uvelirnoe/item/851-legendary-jewelry-products-from-collections-elizabeth.html

Kawshar Ahmed - Senior Staff

More than a month ago #Permalink
Use hjvgyusrcopnfk4x instead of hjvgyusrcopnfk4x.disqus.com for disquss domain.

Dima

More than a month ago #Permalink
now, writes: We were unable to load Disqus. For more information please see our documentation on identifier and urls.
What should I do????????? Help ...
http://beautyton.ru/iskusstvo/uvelirnoe/item/851-legendary-jewelry-products-from-collections-elizabeth.html

Kawshar Ahmed - Senior Staff

More than a month ago #Permalink
I am replying again. Use hjvgyusrcopnfk4x[/] instead of [b]hjvgyusrcopnfk4x.disqus.com for disquss domain.

Grant McWilliams

More than a month ago #Permalink
Here's the URL.

http://grantmcwilliams.com/

My old site I moved to grantmcwilliams-test.com (does not resolve of course outside my network) and the Disqus comments STILL work on it. The settings in SuperBlogger are the same as in SP Comments. This is why I wonder if a part of the URL (_path) is just blank. Not sure how SP comments work but I am a programmer so the following would make sense.

Old site:
VAR1=grantmcwilliams.com
ARTICLE=index.php?option=com_k2&view=item&id=573&Itemid=94

_path = VAR1 + ARTICLE

If this were true and on the new site VAR1 wasn't being populated then _path would come out with just the ARTICLE part. Seems plausible. The question is why?

Dima

More than a month ago #Permalink
Once again I write that after the change in hjvgyusrcopnfk4x, writes We were unable to load Disqus. For more information please see our documentation on identifier and urls. :??????( http://beautyton.ru/iskusstvo/uvelirnoe/item/851-legendary-jewelry-products-from-collections-elizabeth.html

Grant McWilliams

More than a month ago #Permalink
If I change Disqus subdomain to themanthemyththelegend.discus.com (the wrong setting) the error message is...

/**
* var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread]
*/

var disqus_url= "index.php?option=com_k2&view=item&id=575&Itemid=94";
var disqus_identifier = "09f9b0238d96c8d4a3af8ede0c3213ce";
var disqus_config = function () {
this.language = "en"; // get language id
};
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
[color=#FFFF00]dsq.src = 'http://themanthemyththelegend.discus.com.disqus.com/embed.js';[/color]
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);


If I set it to the correct setting of themanthemyththelegend here is the error message


/**
* var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread]
*/

var disqus_url= "index.php?option=com_k2&view=item&id=575&Itemid=94";
var disqus_identifier = "09f9b0238d96c8d4a3af8ede0c3213ce";
var disqus_config = function () {
this.language = "en"; // get language id
};
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
[color=#FFFF00] dsq.src = 'http://themanthemyththelegend.disqus.com/embed.js';[/color]
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);


I think it's pretty clear from that my subdomain setting is right. I looked at Dima_rt5's site and he's having the exact same problem. the subdomain on his is correct as well but his disqus_url is relative.

I'm not entirely convinced this isn't a Joomla! configuration problem but it seems to be limited to SP Comments.

Grant McWilliams

More than a month ago #Permalink
And this is what the SuperBlogger code that works looks like. From this it would seem like the settings in SP Comments are correct but it's passing a relative URL.



//<![CDATA[

var disqus_url= "http://grantmcwilliams-test.com/food/562-irish-people-reviewing-french-food-is-always-good-for-a-laugh";
var disqus_identifier = "4b8ace552e_id562";
//]]>

< type="text/javascript" src="http://disqus.com/forums/themanthemyththelegend/embed.js">

<a href="http://themanthemyththelegend.disqus.com/?url=ref">View the discussion thread.</a>

Grant McWilliams

More than a month ago #Permalink
Let's add to the weirdness. My theory has been that the reason it was breaking is the relative URL in the disqus_url field. So I did this.

Viewed the broken page source
Saved it
Viewed it locally to make sure it was still broken.
Edited the disqus_url to include the entire URL like my working old site
Viewed it with Firefox.

The result was that the Disqus box just showed a busy signal and never loaded BUT it did do something at least.

Then I went back to my site that was broken and refreshed and now the Disqus comment box opens!

Did Disqus just need to get kicked? Why would it start working now when I didn't do anything but pass the whole URL to disqus one time?

I don't know what to tell the other poster but heck, why not try it?

Grant McWilliams

More than a month ago #Permalink
I spoke too soon, the comments don't totally work. The identifier is identical no matter which article is being viewed. I don't know how this number is created but it appears to not be doing it for each article posted.


* var disqus_identifier; [Optional but recommended: Define a unique identifier (e.g. post id or slug) for this thread]
*/

var disqus_url= "index.php?option=com_k2&view=item&id=575&Itemid=94";
var disqus_identifier = "[color=#FFFF00]09f9b0238d96c8d4a3af8ede0c3213ce[/color]";
var disqus_config = function () {
this.language = "en"; // get language id
};
(function() {
var dsq = document.createElement('script');
dsq.type = 'text/javascript';
dsq.async = true;
dsq.src = 'http://themanthemyththelegend.disqus.com/embed.js';


I also thought that maybe it was a K2 problem not passing the article ID properly so I created a standard Joomla Category and created two articles in it. I viewed the articles and they have the same blasted disqus_identifier.

Then I thought maybe it was a mod_rewrite/SEO issue so I trued off SEO and .htaccess and cleared all caches and it has exactly the same problem

I think we're ready to classify this as an SP Comments bug.

Grant McWilliams

More than a month ago #Permalink
Now I'm digging through SP Comments code.

I have a couple of questions for the developer. I'm mainly thinking out loud here.

Shouldn't disqus_url be gotten by using

' . JURI::base() . '?view=article&id=' . $row->id . '";';

so it would survive changes to SEO? It's a bit hard coded but I can already see once I'm messing with my SEO optimization I'm going to lose my comments. I may be wrong. Or is the comment attached to the _postID?

$this->_path = JRoute::_(ContentHelperRoute::getArticleRoute($article->id, $article->catid));
$this->_url = substr(JURI::base(), 0, -1)."/".strstr($this->_path, 'index.php');

Also it appears that your _postID is being generated by doing an MD5 on _url but for some reason it's either later getting overwritten or the md5 isn't working.

$this->_url = substr(JURI::base(), 0, -1)."/".strstr($this->_path, 'index.php');
$this->_postID = md5($this->_url);


Adding the following [color=#800000]FIXES THE PROBLEM[/color]

<?php $this->_postID = md5($this->_url); ?>

to line 23 in plugins/content/spcomments/layout/disqus.php solves my problem and sets _postID correctly. I would assume that the developer will want to figure out why it's not being done in spcomments.php.

Actually I just moved that line from line 79 to 119 in spcomments.php and it seems to fix the problem for me. I'll keep it that way for now until the developer releases a fix. I'm sure if my method doesn't fix it for everyone there's a better way and he'll know.

Kawshar Ahmed - Senior Staff

More than a month ago #Permalink
I have uploaded the latest update. Please download again and update.
Note : You need to wait few minutes to see comment box after updated to the latest version.

Attachments (1)

  • plg_content_spcomments_J17.zip

Grant McWilliams

More than a month ago #Permalink
It works, thanks!


There are no replies made for this post yet.
Be one of the first to reply to this post!

Leaderboard (30 days)

Sifat

Sifat

Total Accepted Answers: 112
Paul Frankowski

Paul Frankowski

Total Accepted Answers: 96
Toufiq

Toufiq

Total Accepted Answers: 89
FUTURECLIENT

FUTURECLIENT

Total Accepted Answers: 2
Kamruzzaman Alam

Kamruzzaman Alam

Total Accepted Answers: 2

115

Templates

295775

Community Users

Newsletter

Don’t miss any updates of our new templates and extensions and all the astonishing offers we bring for you.
We never spam

Joomla! ® name is used under a limited license from Open Source Matters in the United States and other countries. JoomShaper.com is not affiliated with or endorsed by Open Source Matters or the Joomla! Project.

Connect Us