I have enabled the disqus module but the comments are not showing up. I have tried putting it in the content and have also tried as a block. I have also tried multiple themes. It doesn't show up.

The shortcode is also just the name, and have confirmed it is correct.

Does anyone know what the issue could be.

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

RobLoach’s picture

Enable the "Testing"/"Developer" checkbox, and make sure the permissions are checked?

gberm’s picture

Tried both. Doesn't fix it. Very frustrating.

RobLoach’s picture

You have the right node type checked? What theme are you using? Do the other blocks work? If you setup a fresh Drupal install, and run through the steps the run into this bug, then it'll be easy for me to debug. As right now, it's kind of hard to help you out.

gberm’s picture

I appreciate your help. Yes I have checked all of the nodes, and have gone through the process of disabling all of the non core modules. Its seems to be half recognized as there is a check-box to display disqus comments on the node, and in teaser view there is a hyper link that says comments that links to #disqus_thread. The comments just done appear.

jerzakie’s picture

I was having the exact same issue with OpenPublish, though. If you go into the Disqus module look at your shortcode and see if there is a space after it. I removed the space and everything works!

geekgirlweb’s picture

I seem to be having the same problem on the latest D7.

  1. Downloaded/enabled Disqus module
  2. Disabled permissions for regular comments
  3. Made sure comments were closed on nodes, made sure Disqus was enabled for those nodes
  4. Added Disqus block to Content
  5. Cleared site/browser cache
  6. Checked for a white space in sites/all/modules/disqus/disqus.module
  7. Checked Disqus API key to make sure there was no space after it
gberm’s picture

My issue was solved. It was a javascript issue in my theme.

Avalanche’s picture

Did all the same in version 6 .... nothing works. :(

mabho’s picture

I have a custom theme and the issue has been solved when I added the right code. You can check it if you have the Devel module. I just added:

print render($content['disqus']);
lawnmower528’s picture

Where did you add this code? Page.tpl.php?

kap316’s picture

I would like to know the same thing! Where do I put the code?

mabho’s picture

You have to put the code on the node template (node.tpl.php), not the page template.

kap316’s picture

thanks for the quick reply, I have tried to put it there but it's still not showing up. Do I put it on top or bottom or inline somewhere?

kap316’s picture

when I put the code in I get this

Fatal error: Call to undefined function render() in /home/me/public_html/sites/all/themes/.........

any idea what the issue is?

RobLoach’s picture

This is Drupal 7. Drupal 6 would be similar, but probably not have the render() function. Mind trying this to find out where 'disqus' is?

drupal_set_message('<pre>' . print_r($content, TRUE) . '</pre>');
kap316’s picture

FileSize
103.99 KB

disregard -----See #17

kap316’s picture

Ok! I got it working everywhere except for my Articles! Which is where I wanted it most. The box is checked but no disqus is showing up. Getting closer! Any idea?

Added: Also my articles seems to have it's own node name node-cckarticles.tpl.php

Maybe I have to add something in there to show the disqus???

mohanrajthangarasu’s picture

Works fine for me (Drupal 6)and followed below steps.

Step1: Go to www.yoursite.com/admin/settings/disqus

Step2: Under "Visibility" Location should be set as "Injected Variable"

Step3: And then go to node.tpl.php or node-custom.tpl.php of your theme and paste the following code at your desired location

if (!empty($node -> disqus_comments)) :
print $node -> disqus_comments;
endif;

Step4: That's it. Done.

jasonabc’s picture

@crazyguru - thanks dude - worked a treat ;-)

Infinitee’s picture

FileSize
211.29 KB

Drupal 7.12
Disqus 7.x-1.9

Nothing displaying. Code shows up in Firebug but, does not render on pages. Everything is set right and I tried everything above. Got any new ideas?

Thanks,
Ralph

mohanrajthangarasu’s picture

@Inifnitee Hope this helps you

Step1: Create Disqus account and add your site with correct site url, name and enter prefered shotname
Step2: Upload Drupal Disqus module & enable it.
Step3: Go to www.yoursite.com/admin/config/services/disqus and enter shortname you have entered in Disqus site
Step4: Under "Visibility" choose prefered Node Type as well as under "Location" choose Content and hit "Save Configuration"
Step5: Go to www.yoursite.com/admin/people/permissions/list
Step6: Enable access to "View Disqus comments" for anonymous/authenticate users.
Step7: That's it. Done.

In case if you are using custome theme/node.tpl.php, you may have to enter following code.

print render($content['disqus']);

If you have already tried all the above, try clearing your site cache.

MrsWho’s picture

Thanks for all the pointers everyone, but I'm afraid something's still wrong. I've tried every suggestion (included the last on adding render to my theme) and still disqus is only showing in the code, not the node. None of the default themes (bartik, garland) show disqus either, so it doesn't seem to be a theme issue.

I'm not sure why this would affect things, but I'm moving my website to drupal from a different CMS (one comment registered through Disqus with a previous blog post). I've moved the content into Drupal with the same names, but nothing's showing up.

August 5:
Here's what's showing up in my code:

div id="disqus_thread">
<noscript><p><a href="[url]">View the discussion thread.</a></p></noscript>
</div>

Is this a javascript error relating to my theme (custom subtheme of OM HTML 5)?

MrsWho’s picture

I'm desperate now: this is a major issue if I can't get disqus working with drupal. I will personally pay anyone who can help me get this working.

MrsWho’s picture

FileSize
136.63 KB
80.2 KB

Weird: as I experiment, Opera is the only browser that shows Disqus trying to load. When I look in Chrome or Firefox, all I can see is this code:

<div id="disqus_thread">
  <noscript>
    "<p><a href="http://[sitename].disqus.com/url=http%3A%2F%F[sitename].loc%@F[nodeurl]">View the Discussion thread.</a></p>"
  </noscript>
</div>

I've attached screenshots of the same node viewed in opera and chrome. This is a clean installation of Drupal 7.15 with the default Bartik theme enabled, and no modules inabled outside the default core and the Disqus module. Only a few nodes were enabled to test Disqus.

roborracle’s picture

FWIW - I was having the same problem but realized that it was due to an aggressive cache setting in Cloudflare. If you're using Cloudflare, or something similar, you may want to adjust your settings to see if that solves the problem. Worked for me.

MrsWho’s picture

Thanks for the pointer, but I'm afraid that's not it. Glad you got your comments up and running.

zwikzwik’s picture

I had the same problem with a non-visible disqus module, but I decided to skip the module from my website. A couple of days later I had the same problem with another module (twitter_profile_widget), so I looked up again.

I solved my non-visible modules with a simple solution: I picked up all js references in my html and putted that at the top of the page, in the head-section.

Maybe you can do something with.

Yaam’s picture

Thanks for all the pointers everyone, my probleme is :

i can see Disqus: Combination Widget but the Disqus comments Blocks isn't visible .
Have you any ideas about it ?

AaronBauman’s picture

Category: support » bug
Status: Active » Needs review
FileSize
4.25 KB

Please do not review this patch.

I moved it over to #969202: Respect protocol of the page request

geerlingguy’s picture

Version: 7.x-1.8 » 7.x-1.x-dev
Category: support » bug
Status: Active » Needs review

SSL/HTTPS support is being discussed in #969202: Respect protocol of the page request; seems like that's not related to what most of the people in this issue have been having trouble with.

AaronBauman’s picture

Status: Needs review » Active

OK, I will rescind my patch from this thread and post it there.

The symptoms I had were the same though, so some folks will probably get some mileage from fixing ssl support.

AaronBauman’s picture

Category: bug » support
Danny Englander’s picture

Category: bug » support
Status: Needs review » Active

FWW, I just went through several hours of troubleshooting why Disqus would not appear on my D7 site. Typically, if I was lucky, Disqus would load one time out of 20 and that would only happen if I did a hard page refresh. I was pretty sure it was a caching issue so I had a long road ahead methodically disabling all the cache parts of my site and testing one by one. At times, I could even see the Disqus spinner going for a while to try to load the comment box. However, I did not see any specific JS errors so that was a start anyway.

My steps were that I tried most suggestions on this page first about Drupal [original] comment permissions, rendering the code directly, yada yada. None of that worked.

I then focused on caching but for the time being, I disabled the core Drupal comments module, I figured, I'd want to migrate my old comments over to disqus anyway eventually and I'd do that on my local dev, no need to risk anything like that on live. Here's my setup I have for caching and related modules.

  1. liteSpeed web server which is super fast and does caching at a very high level. My worst fear would be that it was an issue with litespeed
  2. Entity cache module enabled
  3. Filecache enabled
  4. All core drupal caching and CSS/JS aggregation enabled with gzip compression.
  5. JCaption - this does a lot of javascript injection so I thought I would test this one too

I went through a methodical process of disabling the above caching mechanisms one by one except for liteSpeed, I just kept that as is. I also tried various combinations. Finally after doing a little code update after a Git pull and a cache clear, I got a WSOD relating to Entity Cache. It seems like Entity Cache was keeping some old data in its tables that Drupal didn't like. I managed to get back to the UI and uninstall the data for that module. Volia, my Disqus finally appeared on my blog pages. I then went through the process of reenabling all other caching including Filecache but not Entity Cache. Everything was still working so I'm now pretty sure Entity cache was the culprit jCaption is the culprit. If I enabled that module, clear cache, Disqus does not load, I can reproduce this every time. I can probably be sure that this was not an issue with the Disqus module and my comment box is now appearing on every page load on cached pages.

scresante’s picture

I was having this problem as well, and it's worth noting that the site was, by design, redirecting to SSL for the entire site via .htaccess

Believing the problem to lie in SSL as mentioned #969202: Respect protocol of the page request , I disabled the redirect, and the comments appeared in http:.

There is a change to discus.js mentioned in the other thread that describes changing 'http://' to '//' on two lines in discus.js for a url parameter. After doing so, and cc all, and dis/reenable JS aggregate, my woes are fixed. Thanks all!

FYI: those two lines are
discus.js:54 url: 'http://' + disqus_shortname + '.disqus.com/embed.js',
to
discus.js:54 url: '//' + disqus_shortname + '.disqus.com/embed.js',
and
discus.js:66 url: 'http://' + disqus_shortname + '.disqus.com/count.js',
to
discus.js:66 url: '//' + disqus_shortname + '.disqus.com/count.js',

wesleymusgrove’s picture

@MrsWho -

Did you ever figure out your issue?

I'm have the exact same issue as you by seeing this in the source where disqus comments are supposed to load:

div id="disqus_thread">
<noscript><p><a href="[url]">View the discussion thread.</a></p></noscript>
</div>

Everything works fine for authenticated users, Disqus comments load in the page content where I have included this in the node template files:

<?php
print render($content['disqus']);
?>

I have verified that the "View Disqus comments" permission is checked for Anonymous and Authenticated users. I have cleared my cache. I have also added the Disqus blocks "Recent Comments", "Popular Threads", "Top Commenters", and "Combination Widget" to the bottom content region and they DO display for Anonymous users, but still nothing for the regular non-block comments.

wesleymusgrove’s picture

jay.lee.bio’s picture

Here's how I got everything working after installing Disqus:

1) I initially had the "Location" as "Block". But no matter what I did, the block wouldn't show. To make matters worse, my website didn't even pass "Verify Installation" at the Disqus website.

2) After changing the "Location" to "Content Area", everything just worked. And that's when it passed "Verify Installation" at the Disqus website too.

That's it. I hope this helps someone.

jay.lee.bio’s picture

Update / correction to #46:

1) When I initially had the "Location" as "Block", I'm pretty sure I didn't check the "Node Types" and instead did that in the block itself under "Content types" (which of course normally works). I believe this was the source of the problem (for me at least), as apparently Disqus ignores whatever settings I choose under the block. After checking the applicable "Node Types", everything worked perfectly. What's weird is that when I changed the "Location" from "Content Area" to "Block", it even worked with Display Suite without any hiccups whatsoever (https://drupal.org/node/863122, #10).

2) After changing the "Location" from "Content Area" to "Block", "Verify Installation" at the Disqus website always passes, even if I uncheck everything under "Node Types".

I consider myself an experienced site builder and have seen weird stuff before where a module all of a sudden starts working after following some specific steps, so I don't think what I went through is too unusual. Everything eventually started working perfectly, and that's what counts. :)

flug’s picture

Issue summary: View changes

See this issue, with fix--it might be the cause of some of the problems you all are having:

https://www.drupal.org/node/2318477#comment-9041319

jay.lee.bio’s picture

For the newbies wondering what #7 means, the following might be related: https://www.drupal.org/node/2078693, #2 & #3

SocialNicheGuru’s picture

Status: Active » Needs review

did not apply for me.

slashrsm’s picture

Patch in #37 is obsolete. We started using implicit protocol notation a while ago.

SocialNicheGuru’s picture

Status: Needs review » Closed (won't fix)

changed considering comment 51. please change if it is not right

SocialNicheGuru’s picture

Status: Closed (won't fix) » Active

While the patch is no longer viable, the issue still remains/.

I had to create a custom content type and use this

<?php
print render($content['disqus']);
?>

The Disqus comment block is blank.

rafaelferreir4’s picture

There is a solution. Change the config to block and it works

mpark’s picture

For Drupal 7 use in your node template:

	// Disqus comments
			$block = 	block_load('disqus', 'disqus_comments');
			$render_array = _block_get_renderable_array(_block_render_blocks(array($block)));
			$output = render($render_array);
			print $output;
	
mpark’s picture

DarrellHQ’s picture

When my comments disappeared I has to switch to mpark's solution.

cthshabel’s picture

yep #55

thanks @mpark for mentioning using block_load. I was banging my head against a wall for a few minutes trying to render($content... but it seems something changed with the latest version being able to use blocks instead.

good thread of comments though

jphelan’s picture

For me it was jquery_update, didn't work with 1.10 but switched it to 1.7 and it came back.

Spanners’s picture

I previously had Disqus working on our site http://cefa.org.au, then I did the update to 7.x-1.12 and all of a sudden Disqus comments stopped appearing at the bottom of my selected content types.

All I needed to do was go to Configuration > Web Services > Disqus and click Save Configuration. That is it.

I guess it just needed to save my settings again, because now Disqus is back.

Hope this helps someone, and your issue is as easy to fix as mine.

trothatl’s picture

#60 Thank you. Spent an hour pulling my hair out until I found your comment. Had the same issue after the 7.x-1.12 update. Where Disqus should have been enabled by default, it was disabled. I tried enabling on a node-by-node basis, but the enabled status would not be retained after saving. I followed your advice to save the existing configuration under web services and everything is working again.

radj’s picture

#60 is such a time saver! Thank you!

Keith Caulkins’s picture

I can confirm #60 works for me as well. There should be an update where this isn't needed, caused me quite the headache.

spanac’s picture

@Spanners thank you. #60 fixed the problem.

deborah.ufw’s picture

Disqus module did not show up on the page or in the code after installing and activating according to the instructions on Drupal, the instructions on Disqus (which were out of date) and two tutorials in Drupal 8.0.5 using Mac OSX El Capitan with PHP 5.5.

The only way I was able to get it to show up was to create a custom content type and add it as a field to that. Despite many methods, including several mentioned above, it never was placed, even in the code, in Drupal's out-of-the box content types "Article" and "Page".

CriticalBlast’s picture

#60 fixed Disqus for articles that pre-existed doing the update only.

Any new articles posted post-update do not show Disqus comments. Regretting finally updating over my working Dev version.

(EDIT: It's apparently no longer checked as a default when articles are submitted. I'm going to see if I can't create a rule that will enforce checking that box when a user submits an article.)

Anonymous’s picture

resolved

rahul_sankrit’s picture

I have exact the same issue and found that "Shortname" is empty on Disqus configuration page.

Here are the steps I followed:

  1. Enter the Shortname, The website Shortname that you registered Disqus with. If you registered http://example.disqus.com, you would enter "example" here.
  2. Enable the Disqus module and go to Disqus settings page (admin/config/services/Disqus).
  3. Enable the Visibility node types using Disqus and select the location to Block or Content Area.
  4. When "Block" is selected, then the Disqus comments will appear in the block (admin/structure/block).
  5. When "content area" is selected, then the comments are displayed in the content area for selected node type.we can control the display by insert into template.
  6. <?php
    print render($content['disqus']);
    ?> 
  7. Under Disqus permissions, add anonymous and authenticated users to View Disqus comments (as per your requirement).

We can add the html tags or text above the disqus comments When "Block" is selected.
// Add custom title for "custom say Leave a comment" Disqus comment block.

function custommodule_block_view_alter(&$data, $block) {
  switch ($block->delta) {
    case 'disqus_comments':
       $data['subject'] = "<div class='class-name'><span class='class-name'><span class='some-title>some title</span><span class='title-option'>Leave a comment</span></span></div>";
       break;
  }
}
jennypanighetti’s picture

#60, just saving the settings, worked for me.

That is really dumb. Module updates shouldn't require this.

Thanks, @Spanners!

apaderno’s picture

Status: Active » Fixed

I am closing this support request since the user who opened it found what the problem was in his case.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.