Hello,

I was testing the module and noticed that there is a condition that when checkbox "Receive node follow-up notification e-mails" option should appear, but doesn't.

When you give a user permission to create Blog content type (and not pick anything else on admin/user/permissions page), and also pick "Blog entry" from comment notify settings (admin/settings/comment_notify), it appears that logic fails at line number 290, thus it will never populate checkbox form.

The line ask for logic, where it looks for user_access that has create 'content' however, as far as I can tell, blog is 'entries' rather than 'content'.
I have tried the logic

if (user_access('create '. $type->type .' content') || user_access('create '. $type->type .' entries'))

and appear to work as expected.

If this is already addressed, please ignore this.

Thank you!
Shino

Files: 
CommentFileSizeAuthor
#10 717590-commentnotify-node-access-D6.patch764 bytesDave Reid
#8 717590-commentnotify-node-access-D7.patch3.56 KBDave Reid
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 717590-commentnotify-node-access-D7_1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#7 717590-commentnotify-node-access-D7.patch3.51 KBDave Reid
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 717590-commentnotify-node-access-D7_0.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#2 717590-commentnotify-node-access-D7.patch709 bytesDave Reid
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 717590-commentnotify-node-access-D7.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]
#1 717590-commentnotify-node-access-D6.patch764 bytesDave Reid

Comments

Version:6.x-1.3» 6.x-1.x-dev
Status:Active» Needs review
StatusFileSize
new764 bytes

Confirmed. This should use node_access('create', $type->type) instead since that can handle all possible node types and access implementations.

StatusFileSize
new709 bytes
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 717590-commentnotify-node-access-D7.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Same patch for D7 branch.

Status:Needs review» Needs work

It seems this doesn't work for forum nodes but I have no idea why that would be.

#727978: Notify node author on forum threads.

Just found this in another module: it's got to be $type->name instead of $type->type.

Haha, bad logic in that other module last night. I am back to stumped...

Version:7.x-1.x-dev» 6.x-1.x-dev
Status:Needs review» Needs work

The problem happens with blog, forum, ubercart and possibly other modules because of their different naming convention rules in implementation of hook_perm: 'create blog entries', 'create forum topics' and 'create products' permissions are skipped by comment_notify which only allows 'create '. $type->type .' content' permissions.

I don't think comment_notify on Drupal 6 can be patched to take into account all possible use cases, so i solved my issue by means of http://drupal.org/project/config_perms

I added a new 'create blog content' permission with path 'node/add/blog' and assigned it to my registered users: now the checkbox is shown, the trick would work as well with 'product' or 'forum'.

By the way, a different workaround could have been the creation of a 'dummy' content type with 'create dummy content' permission for my registered users, hiding the corresponding 'create' link from the menus. I didn't like the idea of a useless content type in my system, but it may be a good solution if you don't want to install additional modules.

Version:6.x-1.x-dev» 7.x-1.x-dev
Status:Needs work» Needs review
StatusFileSize
new3.51 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 717590-commentnotify-node-access-D7_0.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

Revised patch for D7.

StatusFileSize
new3.56 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 717590-commentnotify-node-access-D7_1.patch. Unable to apply patch. See the log in the details link for more information.
[ View ]

And the real patch this time...

Fixed for 7.x: http://drupal.org/cvs?commit=445086

Thanks, Dave.

Status:Needs work» Needs review
StatusFileSize
new764 bytes

Re-attaching the D6 patch that still applies.

Status:Needs review» Fixed

... oops! I missed the patch Dave already posted on February. Well, it looks like content_notify definitely can be patched to take into account all use cases: thank you, Dave!

Status:Fixed» Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.