Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Just noticed this and have come up with a fix which I've committed.
AF was checking the comment setting in a way that accommodates both nodecomment and Drupal comments, but the access check which decides whether to output a reply link only checks for standard comments permission:
function advanced_forum_get_reply_link($node) {
$reply_link = array();
// Give nodecomment (if installed) first shot at the comment setting
$comment_setting = (empty($node->node_comment)) ? $node->comment : $node->node_comment;
// Anchor to the form is depends on if reply is a node or a comment.
$fragment = (empty($node->node_comment)) ? 'comment-form' : 'node-form';
if ($comment_setting == COMMENT_NODE_READ_WRITE) {
if (user_access('post comments')) {
// .. display reply link
}
else {
// User does not have access to post replies on this node.
return 'reply-forbidden';
}
This was resulting in a reply link being output that simply linked to:
...which obviously didn't do anything very useful.
Comment | File | Size | Author |
---|---|---|---|
#1 | reply_link_access_check_for_nodecomment-1291650.patch | 1.23 KB | mcdruid |
Comments
Comment #1
mcdruidPatch attached and committed to 6.x-2.x branch.
Comment #2.0
(not verified) CreditAttribution: commentedfixed typo for syntax highlighting