Needs review
Project:
Disqus
Version:
6.x-1.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
10 Sep 2011 at 09:38 UTC
Updated:
8 Jan 2015 at 15:32 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
bkosborneHmm,
I set up a simple view that shows the comment number and it works fine in 1.9. Can you try again and give me some more detail? The changes between those two releases shouldn't affect how comment numbers are displayed for views.
Comment #2
mkhadavi commentedI'm having a similar issue in 1.9 where it shows the number of comments in the view, but it's not accurate. In some cases, I have a post where there are 2 comments, but in the view it says 0 comments. Some posts are accurate, others are not.
Comment #3
bkosborneIt is always like that are just for newer posts?
Comment #4
mkhadavi commentedOnly some posts.. you can see an example site at http://www.blackballoonpublishing.com/blog . The "smile sessions" post says 0 comments but has 2 comments.
Comment #5
kari.nies commentedI'm having a similar issue. When upgraded from 6.x-1.8 to 1.9 my comment counts all got set to 0 in teaser views. When I access the nodes however, the comments are all there. I tried reverting back to 1.8 but it has not helped. All I can tell is that the links getting generated by the [disqus_comments] view field are path aliases on the broken version and node id paths on the working version.
I'm assuming that these pages are indexed by the node id paths on the disqus site and therefore failing when the path aliases are given for the count lookup.
Any suggestions on how to fix this will be very appreciated.
Thanks,
-- Kari
Comment #6
mkhadavi commentedI reverted to 1.8 and it has not fixed my issue either.
Comment #7
mkhadavi commentedI also tried removing the field from the view and adding it again, but now it says 0 comments for everything.
Comment #8
mkhadavi commentedUpon closer investigation it does look to be an issue with newer posts, since I first enabled the module and turned on the commenting display.
Comment #9
bkosborneI'll do some testing on this and see what I can come up with.
Comment #10
kari.nies commentedAs a follow up, I was able to get my comments counters working again. I had reverted back to version 6.x-1.8, but I had failed to run update.php. After running the update the software has seemed to switch back to using node id paths. Looks like backing out on 1.9 may have fixed the problem after all for me.
Comment #11
mkhadavi commentedDid you disable/re-enable the module? Or simply upload the 1.8 files to replace the 1.9 files and run update.php ? Doing the latter didn't fix it for me but perhaps the former will (as a temporary solution, assuming I don't lose the posted comments).
Comment #12
robloachWhat version of Views are you on?
Comment #13
jsibley commentedI am running Disqus 6.19 and Views 6.x-2.16.
Everything seems to be working as expected (I can show recent comments from Disqus, topics with the most comments, drill down to comments from advanced forum) except that I still can't see an accurate count of the number of comments in a view using Disqus:Comments as field.
I still see 0 comments on nodes that have comments. If I click on the link, I can see the appropriate comments in Disqus.
Just in case it helps, here is the query that is apparently used in my view:
SELECT DISTINCT(node.nid) AS nid,
node_revisions.teaser AS node_revisions_teaser,
node_revisions.format AS node_revisions_format,
node.type AS node_type,
node.title AS node_title,
history_user.timestamp AS history_user_timestamp,
node.created AS node_created,
node.changed AS node_changed,
node_comment_statistics.last_comment_timestamp AS node_comment_statistics_last_comment_timestamp,
users.name AS users_name,
users.uid AS users_uid,
node_counter.totalcount AS node_counter_totalcount,
GREATEST(node.changed, node_comment_statistics.last_comment_timestamp) AS node_comment_statistics_last_updated,
term_data.name AS term_data_name,
term_data.vid AS term_data_vid,
term_data.tid AS term_data_tid,
node.sticky AS node_sticky,
node.nid AS node_nid,
node.sticky AS topic_is_sticky,
forum.tid AS topic_actual_forum
FROM node node
LEFT JOIN term_node term_node ON node.vid = term_node.vid
LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
LEFT JOIN history history_user ON node.nid = history_user.nid AND history_user.uid = 1
INNER JOIN node_comment_statistics node_comment_statistics ON node.nid = node_comment_statistics.nid
INNER JOIN users users ON node.uid = users.uid
LEFT JOIN node_counter node_counter ON node.nid = node_counter.nid
LEFT JOIN forum forum ON node.vid = forum.vid
WHERE (node.status = 1) AND (term_data.vid in ('1')) AND (term_node.tid = 1)
GROUP BY nid
ORDER BY node_sticky ASC, node_nid DESC, node_comment_statistics_last_updated DESC
I am using pathauto and aliases. Is there something I should do to make sure everything is synched up properly? I'm also happy to do some troubleshooting if it helps to resolve this.
Comment #14
jsibley commentedI have some time this week and would be happy to see if I could help resolve this issue, once and for all by doing some troubleshooting, but I don't know what to look for. I have firebug installed and I have an XML export of what is stored in Disqus. But, I don't know what it would be most helpful for me to look at to determine why nodes with comments are showing up as "0 comments".
What should my next steps be?
Comment #15
jsibley commentedAny chance we could make some progress on this? I provided more details and am willing to help troubleshoot if I am pointed in the right direction.
Comment #16
bkosborneI've been working on this on and off with no luck. I'm running 6.x-1.9 on a site without any issues with comment counts.
However, on a sandbox site, I AM having these issues. I can't get the comment counts to show anything but zero... very perplexing. I've read through the code over and over for hook_link and everything seems to be okay.
@jsibley, was this always an issue for you? When did it start happening? I wonder if there's something up on Disqus' end
Comment #17
jsibley commentedThis has always been an issue for me. I've never had the comment count show properly, even though the links seem to work properly.
Still happy to troubleshoot, even via irc, if I can just get some guidance on what to look at.
Comment #18
mkhadavi commentedHas anyone made progress with this?
Comment #19
Melissamcewen commentedHaving this issue myself. Tried downgrading to 6.x-1.8 and it didn't work.
Comment #20
Melissamcewen commentedInterestingly in old posts, the reactions are showing but not the comments :/
you can see it in action on huntgatherlove.com since I didn't notice the bug before I pulled the latest commit from dev
Comment #21
pyrello commentedI have attached a patch that fixes this issue. It just makes the following change on line 21 of the include/views_handler_field_node_disqus_comments.inc file:
becomes:
Comment #22
pyrello commentedSo, apparently making a diff file using the diff command on a Mac does not render the correct file format. I'm not in a position to be able to put together a proper diff file at the moment, but the snippet of code above should be enough to make this work.
Comment #23
namscott commented#21 worked perfectly for me. Thanks!
Comment #24
bryan cordrey commentedI tried #21 and I am getting the following php error:
PHP Fatal error: Call to a member function options_validate() on a non-object in /docroot/sites/all/modules/views/includes/admin.inc on line 2501
In the view, the field is now shown as Broken/missing handler: node > disqus_comments. Has anyone else had this problem? Is there another solution?
Comment #25
nickbumgarner commentedI'm also getting the Broken/missing handler error. Anybody ever resolve this?
Comment #26
zerolab commentedAttaching the above patch re-rolled for the latest 6.x-1.x branch.
Comment #27
zerolab commentedSorry, re-rolled as drush make was complaining.