Closed (fixed)
Project:
Drupal core
Version:
5.x-dev
Component:
base system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
25 Feb 2006 at 17:20 UTC
Updated:
15 Dec 2006 at 17:01 UTC
Jump to comment: Most recent file
Comments
Comment #1
eafarris commentedAttached is a patch to hide the block if there aren't any comments.
Yes, some settings for this block would be nice.
Comment #2
Julien PHAM commentedThanks, it works perfectly. I was unable to figure out how to apply a patch on windows, so I apply it myself by editing the comment.module.
Would be fine to commit this patch in a new comment version...
Comment #3
Julien PHAM commentedSo, I join the patch I generated with tortoise cvs...
Comment #4
Julien PHAM commentedhehe I'm stupid, the patch already has been posted in this thread :)
Comment #5
eafarris commentedLet's add it to the queue, then.
Comment #6
Julien PHAM commentedPerhaps would be fine to commit such a patch in the next comment.module version. I used it for some time now and it seems it works fine... but I have to apply it every time I update my drupal.
Thanks
Comment #7
chx commentedIndeed this is a bug which worths fixing. Rerolled a simplified version against HEAD.
Comment #8
chx commentedDarn, something slipped in -- and the comment part just filled my screen so i have not realized it continues :(
Comment #9
killes@www.drop.org commentedI think what we need is a general guideline. What should happen to blocks that have no items? Should they magically dissappear (like implemented in this patch) or should there be a message "no comments found"?
Comment #10
chx commentedComment #11
Kjartan commentedHere is a simpler patch which makes the recent comments block work like other blocks. The block system already has checks to not display blocks that return no content.
Comment #12
coreb commentedMoving out of the "x.y.z" queue to a real queue.
Comment #13
joshk commented+1 For Kjartan's patch.
Block's w/no content don't display. This is intuitive, and how blog block and others work when their queries turn up no results.
Comment #14
joshk commentedThis applied clean against fresh 5.0.dev checkout. Works as advertised.
Comment #15
dries commentedKjartan's patch looks good. Not showing empty blocks has a number of downsides:
1. It's confusing. You enable the block, but it doesn't shows up.
2. It might be a performance cost; you don't realize there are certain blocks that you might as well disable.
Comment #16
Kjartan commentedDries, that's all true, but my patch makes the comment block consistent with the other blocks in core. Not showing empty blocks has been the standard for a long time. For 5.0 it seems easier to make comment block work the same as the rest, and then evaluate if we want to change this for a future release.
Comment #17
dries commentedCommitted to CVS HEAD. Thanks.
Comment #18
(not verified) commented