I only allow comments on certain types of nodes, and not others, but Comment RSS provides a feed even on the nodes that will never have comments. Would it be possible to only show the feed icon on nodes that can have comments? Thanks in advance!

Comments

gábor hojtsy’s picture

Category: feature » bug
Status: Active » Postponed (maintainer needs more info)

The code is supposed to only show / provide the feed if the node has commenting turned on. The button for example is displayed as a result of this code:

    if ((arg(0) == 'node') && is_numeric($nid = arg(1)) && is_null(arg(2)) &&
        variable_get('commentrss_node', TRUE) && ($node = node_load($nid)) &&
        ($node->comment != COMMENT_NODE_DISABLED)) {
        
      drupal_add_feed(
        url('crss/node/'. $node->nid),
        t('Comments for "@title"', array('@title' => $node->title))
      );
    }

The last condition checks whether the code has comments disabled or not.

Are you sure this is misbehaving?

dave reid’s picture

Status: Postponed (maintainer needs more info) » Fixed

I tested this and confirmed when a node has comments disabled, there is no link added for the crss/node/nid feed. I think you are seeing just the /crss feed since you've set it to be added on every page. Marking as fixed.

Status: Fixed » Closed (fixed)

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