Hi,
I can't get the content_thread subscription type to work; that is, I can't get notifications to trigger an event when new comments are posted in a thread the user subscribes to.
After a bit of investigation, I believe this is because the two action hooks (notifications_content_comment_insert_action
& notifications_content_comment_update_action
) are empty.. Is this intentional?
I haven't tried putting in a body like the ones from the node action hooks - that is, something (simplified) like the following - to see if that solves the problem. Mostly because I'm fairly new to the notifications code..
function notifications_content_comment_insert_action($node, $context = array()) {
notifications_content_node_event('comment', $node)->trigger();
}
Anyways - my questions are just "is this a known problem?" and "what can I do to help?"
Regards
Morten
Comment | File | Size | Author |
---|---|---|---|
#5 | comment-subscription-not-working-1084802-5-D7.patch | 2.14 KB | webflo |
#5 | 1084802-triggers.jpg | 360.27 KB | webflo |
#3 | comment-subscription-not-working-1084802-3-D7.patch | 1.85 KB | webflo |
#2 | 1084802-comment-subscription-not-working.patch | 1.88 KB | webflo |
Comments
Comment #1
spacereactor CreditAttribution: spacereactor commentedI facing same problem, all the comment unable to trigger email send. Please can some help to make a patch to fix this.
Comment #2
webflo CreditAttribution: webflo commentedHere is a patch. Please review. Make sure that your configured the triggers.
Comment #3
webflo CreditAttribution: webflo commentedSlightly better patch.
Comment #4
sharplesa CreditAttribution: sharplesa commentedProposed test methodology
Proposed procedure to verify the problem:
Proposed procedure to verify the fix:
patch notifications_content/notifications_content.inc comment-subscription-not-working-1084802-5-D7.patch
)Results: SUCCESS
I followed the procedures described above, and received notification for comments.
EDIT 2011-08-31: Revised procedure for correctness and new patch and new result.
Comment #5
webflo CreditAttribution: webflo commentedMake sure that the user has the "view comments" permission. Rerolled the patch and made a screenshot to show the trigger configuration. It is comment trigger not node.
Comment #6
sharplesa CreditAttribution: sharplesa commentedWebflo, you're a genius! I completely overlooked the "comment" tab on the triggers page.
So, I revised the procedure at #4, ran it, and got notification!
Changing state to "reviewed and tested".
Thanks
Comment #7
Dane Powell CreditAttribution: Dane Powell commentedPatch seems to work, but I do have one thought: shouldn't this action be enabled by default, just like the equivalent actions on the node tab?
Comment #8
webflo CreditAttribution: webflo commentedGood catch. Fixed in Commit 1d08ce4 and 7a404f8 on 7.x-1.x.
Comment #9
Jesuscares CreditAttribution: Jesuscares commented@sharplesa: Thank you for your steps you provided in comment #4 above. I was able to follow them and found that my comments were not working because I had not enabled the triggers.
I would like to add one note: There is a single trigger available titled "Trigger: When either saving a new comment or updating an existing comment", DO NOT use that one. I looked at it as a shortcut and realized that there is no value in the drop down for a trigger that says "Send notifications for comment (if published)" there. You need to add the trigger separately for "Trigger: After saving a new comment" and "Trigger: After saving an updated comment." Do this by selecting "Send notifications for comment (if published)" from the dropdown and clicking "Assign" for each of these two triggers. I didn't need to install the patch. Once I set those triggers and tried a comment, it worked! Thanks!