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.
On each basic page the text "0 comments" is always shown although the setting for the basic page content type is hidden for comments. Disappears when a different theme is activated.
Comment | File | Size | Author |
---|---|---|---|
busy_0_comments.jpg | 115.71 KB | richH |
Comments
Comment #1
sojusnik CreditAttribution: sojusnik commentedI have the same problem here. Seems to be a bug, that needs to be fixed.
Comment #2
stBorchertPlease try the following: change line 60 of template.php from
if ($vars['page'] && isset($vars['content']['links']['comment'])) {
to
if ($vars['page'] && isset($vars['content']['links']['comment']) && $vars['comment_count'] > 0) {
Comment #3
richH CreditAttribution: richH commentedHi,
perfect! The solution works great. The "0 comments" disappears nicely with this change to the code
Rich
Comment #4
yooperjb CreditAttribution: yooperjb commentedAwesome! Thanks for the fix. This has been driving me crazy. Didn't realize it was actually the theme causing the issue.
Comment #5
stBorchertFixed with commit 57e124b.