Closed (fixed)
Project:
Commentsblock
Version:
7.x-1.2
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 Apr 2012 at 21:00 UTC
Updated:
4 Aug 2012 at 10:21 UTC
Comments were not displaying for anonymous users with the "View comments" permission checked. Looks like this is due to line 141 of commentsblock.module which pre-maturely checks if the user has the 'post comments' permission. Instead, this can be moved to the if for display_option 0.
Won't this allow anonymous users without permission to see comments? Thankfully no, because the permission is checked by the comment_node_page_additions function itself as it should be.
| Comment | File | Size | Author |
|---|---|---|---|
| 0003-Fix-bug-preventing-anonymous-users-from-viewing-comm.patch | 1.45 KB | sokrplare |
Comments
Comment #1
marcoka commentedi lost track why we check for
$node->comment > 1Comment #2
sokrplare commentedDo you know if this will get committed into a new version? Just don't want to lose changes in a site update. Thanks!
Comment #3
marcoka commentedi will commit this no worries.
Comment #4
sokrplare commentedUh-oh - I was mistaken. Just realized $node->comment isn't the number of comments, it is the value for "whether comments can be added, read, or accessed, for this node." (source http://drupal.org/node/345297)
It still is a bug, but this means the patch in the original issue is not right.
Comment #5
marcoka commentedso this patch posted here is not correct?
Comment #6
sokrplare commentedSomething like this might be more accurate (and easier to remember by using the constants):
Probably a better way to format/structure, but I'm too tired to come up with it right now :)
Comment #7
geekglue commentedI'm experiencing the same problem so I assume this didn't go any further. The logic from the first patch seemed correct so I tried changing :
to :
This is working for me.
Comment #8
marcoka commentedthx for testing. i will add this in the next release.
Comment #9
sokrplare commentedAny chance a new release is forthcoming?
Comment #10
marcoka commentedso you tested #6 and its working? so RTBC
Comment #11
sokrplare commentedYes, using it on two large live sites so I sure hope so! :)
Comment #12
marcoka commentedok great. i am adding #6, wrote it to my note for tonight/tomorrow
Comment #13
marcoka commented#6 commited to 7.x-1.4