Needs work
Project:
Disqus
Version:
6.x-1.7
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Mar 2010 at 15:24 UTC
Updated:
5 Mar 2013 at 12:21 UTC
Jump to comment: Most recent file
In version 1.6 the switch to node/# identifiers from aliases happened. As a result the comment counter for Disqus now links only to node/# because the JS counts on the href to be it's identifier. All fine and dandy except we have aliases for a reason and even the comment count link should respect that. So attached is a patch that pulls the alias from a "rel" attribute and makes sure the link gets the appropriate path.
NOTE: I think it's *alright* to put this in the rel attribute. Any opinions are welcome of course.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | count_alias.patch | 1018 bytes | bobooon |
Comments
Comment #1
bobooon commentedComment #2
benklocek commented1+ For this patch to make it in to the next rev.
I can't use the comment counts because it links to the node (another page load and the wrong url !)
Comment #3
el7cosmosi apply the patch...but still, links goes to node/* not the alias
Comment #4
benklocek commentedI'm getting the same issue as @el7cosmos.
'rel' => url($path), is getting set to node/#, so the jquery trick is just replacing node/# with node/#.
Comment #5
lelezard commentedI have the same issue before and after applying the patch
Comment #6
apemantus commentedI just came across this issue in the latest version. I fixed it a simialr way to the above: the module outputs the aliased path as the href link, sticks the node path in the rel attribute and uses that in the JS. My patch making skills are rubbish as I'm using Windows and haven't worked out how to fix the line-endings, but below are commented changes.
In disqus.module
In disqus.js:
Comment #7
ztdgz commentedThis is still a problem in 6.x-1.9.
However, I have noticed in the release notes / changes since 6.x-1.8 the following:
Perhaps that fix didn't make it through?
-- edit --
Just looking at the diff for the change noted above:
http://drupalcode.org/project/disqus.git/commitdiff/b0bfe6476f48827edccb...
The change doesn't seem to fix the issue to me...?
-- /edit --
Either way, I have still experienced the problem on 6.9-1.9 and tried a fix.
I have made a change to disqus.module which fixes the problem in 6.x-1.9.
Notes:
Comment #8
udijw commentedHi,
thanks for sharing this. I did a similar change based on your change. I am not really sure what the change you placed did not work (and I probably did a terrible job of coding this). However, I thought this may be useful for others who are having a similar issue that was not solved by ztdgz on #7.
I also changed disqus.module.
I think that the right change may be keeping the change at #7 and having disqus_link poll it, but since Iwas not sure, I wanted to keep changes to minimum.