In Drupal 7, the Community Tags Block is never displaying. I looked through the code and found:

(community_tags.module line: 1129)

function _community_tags_is_tagging_view_visible($node, $context) {
  if ($node && variable_get('community_tags_display_' . $node->type, COMMUNITY_TAGS_MODE_TAB) == $context) {
    $vids = community_tags_vids_for_node($node);
    if (!empty($vids)) {
      return TRUE;
    }
  }
}

It seems like the code is always checking against the TAB context, so it isn't displaying the block. If I change:

Line 1130:

if ($node && variable_get('community_tags_display_' . $node->type, <strong>$context</strong>) == $context) {

Instead of:

if ($node && variable_get('community_tags_display_' . $node->type, <strong>COMMUNITY_TAGS_MODE_TAB</strong>) == $context) {

With the change everything works as expected. I'm new to the issue request capabilities, and this is my first post so please let me know if I'm going about any of this wrong. Thanks!

Comments

boonep’s picture

Whoops! Remove the STRONG tags from the code. Thought it might highlight. Should read:

Change Line 1130 to:

if ($node && variable_get('community_tags_display_' . $node->type, $context) == $context) {

Instead of:

if ($node && variable_get('community_tags_display_' . $node->type, COMMUNITY_TAGS_MODE_TAB) == $context) {
boonep’s picture

Status: Active » Closed (works as designed)

Whoops! Think I figured it out. My problem was the community tags display settings under the content type. Thanks!