If you enable one of the blocks provided by the forum module but don't have any forum topics on your site yet, the block displays on your site with its title only (and no content whatsoever).
That is a bug. There are two patterns in Drupal that are used for the "empty block" situation: (1) don't display the block at all, or (2) display with some appropriate empty text such as "No content available".
Since the forum module blocks do some crazy pre-rendering stuff, I'm not sure how we would accomplish (1), and anyway, (2) seems to be the better pattern that we are moving to for content-related blocks in Drupal core. So, this patch does that.
It might be better to say something like "No topics available" instead, but that would be adding a string. This patch doesn't add any new translatable strings.
| Comment | File | Size | Author |
|---|---|---|---|
| forum-empty-block.patch | 721 bytes | David_Rothstein |
Comments
Comment #2
David_Rothstein commentedforum-empty-block.patch queued for re-testing.
Comment #4
jody lynnforum-empty-block.patch queued for re-testing.
Comment #6
David_Rothstein commentedBroken testbot, I assume.
Comment #7
mohit1604 commented@David_Rothstein , what do you mean by 'block' provided by forum module ? Does it mean 'General Discussion' option that is available in forum type ?
Comment #8
David_Rothstein commentedThis refers to the "Active forum topics" and "New forum topics" blocks that the Forum module exposes for placement on the Blocks administration page (at
admin/structure/block).Looks like Drupal 8 has those blocks also, but doesn't have this bug - the blocks don't display at all if they are empty. So this issue can remain on Drupal 7 and would still be useful to fix there.
Comment #9
bakerlee commentedHi,
Can you please clarify for me what the fix is for the Active Forum Topics header displaying when there are no topics? I have this issue on my site and am using 7.6.1.
Thanks!