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.
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
Comment #1
boonep CreditAttribution: boonep commentedWhoops! Remove the STRONG tags from the code. Thought it might highlight. Should read:
Change Line 1130 to:
Instead of:
Comment #2
boonep CreditAttribution: boonep commentedWhoops! Think I figured it out. My problem was the community tags display settings under the content type. Thanks!