Posted by jaron on May 27, 2009 at 10:05pm
Jump to:
| Project: | Forum Thread |
| Version: | 6.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (cannot reproduce) |
Issue Summary
It seems that the links to the comments don't actually link to the comment, only to the original topic. I tried using the patch for link_alter that was posted for 6.x-1.dev, but that didn't change anything. (I will admit that coding baffles me, so perhaps that has nothing to do with it.) The issue is that the link that is created by the comment title is something like: drupal6_11/node/85#comment-2 ; but the actual link to the comment is: drupal6_11/node/85/2#comment-2. It seems like the construction of the link gets messed up. Is this a conflict with other settings I have? Any help would be appreciated. I really like the module.
Comments
#1
#2
Jaron,
I'm having this same problem...it there a fix for this? Please let me know, thanks
#3
never found a solution. just went a different direction for my site that didn't use forum thread. sorry. would still be interested if someone did solve it.
#4
I installed Drupal for the first time just a couple of weeks ago (so I am still a newbie) and I am amazed of the many useful modules I stumbled upon so far.
One of these is Forum Thread, but I could not get the links of the comments to a specific forum topic point to the correct comment.
It had the mentioned form
like:
drupal6_11/node/85#comment-2 ;but the actual link to the comment is:drupal6_11/node/85/2#comment-2A look into the database showed the correct entries - a far as I understand them ;-)
Having fiddled around for quite a while, I am pretty sure the comment links are only displayed incorrectly by the forumthread.module.
First, I changed function get_node_comments($nid, $cid = 0) as advised in http://drupal.org/node/343486 to use
drupal_alter('link', $links, $node);and added $node to
$output .= theme('comment_view', $node, $comment, $links);because I thought it might me missing ;-)
Nothing changed, so I changed the following line in function theme_forumthread($topics)
from
$output .= '<li class="response">'. l($comment->subject, 'node/'. $comment->nid, array('fragment' => 'comment-'. $comment->cid)) .' - ';to
$output .= '<li class="response">'. l($comment->subject, 'node/'. $comment->nid.'/'.$comment->cid, array('fragment' => 'comment-'. $comment->cid)) .' - ';so the comment's cid is inserted with a trailing '/' before the array('fragment'-stuff.
This seems to solve the problem for me !
It would be great if this could be tested and included into the module !
Forgive me my unability to post a patch ...
#5
su1001, thanks for helping out...I'm newbie and I don't know which file to edit, please point me in the right direction....much appreciated. Thanks again
#6
Hi,
the mentioned function is in forumthread.module which you can find in your forumthread-directory
(I have it under path-to-my-drupal/php/sites/all/modules/forumthread/) .
Good luck!
#7
The comment link is correct for some sites. See for example http://drupal.org/node/739834#comment-2707046 (random comment from drupal.org). Please post your comment settings for the content types where you are seeing this error.
#8
Also please test the development version in all cases. In this case in particular it changes the implementation of the alter function to be correct.
#9
Closing this for now. If more information comes in it can be reopened at that point.