comments
comments copied to clipboard
Notifications - Clarify Expectations and Fucntionality
Hi Josh,
I have been playing around and testing the comment facility and I am a little confused over expectations and actual functionality/terminology when it comes to notifications.
At the moment, the client only wants to enable guest comments to measure usage and then decide on budget to invest in expanding it to allow for registrations, custom templates etc.
My settings are as follows:
// General
'allowAnonymous' => true,
//Moderators
I have setup a admin group and set this to be the moderators group. Contains one user at present.
// Notifications
'notificationAuthorEnabled' => false,
'notificationReplyEnabled' => true,
'notificationSubscribeDefault' => true,
'notificationSubscribeEnabled' => true,
'notificationSubscribeCommentEnabled' => true,
'notificationModeratorEnabled' => true,
'notificationModeratorApprovedEnabled' => true,
My expectations are as follows:
Comment Made The Moderator would receive a notification that a new comment has been made.
Comment Approved A guest user would receive a notification once their comment is approved. A logged in/register user would receive a notification once their comment is approved.
Comment Reply A guest user would receive a notification if someone replies to their comment once comment is approved. A logged in/register user would receive a notification if someone replies to their comment once comment is approved.
Moderators Moderators only receive a notification of new/replied to comments for them to approve.
However, what appears to occur is that all emails are being sent to the Moderator and nothing is received by either a guest user OR a registered/logged in user for any of the above.
I think what also threw me initially, is that the terminology states the author, I had initially assumed this was referring to the author of the comment, but having re-read this a few times and tested, I think this now means the author of the original entry. this was a little confusing, but this might be down to my personal interpretation.
Can you please shed some light on this and also if this is not a feature, could it be considered to allow for the use case above - whereby guests and users get notifications of approval etc.
I have just done some further testing and it seems the notifications on replies only work when the setting 'requireModeration' => false, is false. As this generated and sent a notification of the reply instantly. When this is then re-enabled to true, and the comment is then approved by the moderator, no further email is sent to the original comment author. This was sent to be registered and guest users.
So perhaps there is a bug here in regards to if 'requireModeration' => true, then not triggering emails after approval.
So - if you have requireModeration set to true, notifications are basically put on hold until the comment is approved. Otherwise, if you have a large amount of spam, or otherwise bad comments coming in, users would be notified of these. As such, when moderation is enabled, notifications are only fired when comments have been approved.
There's also a few instances where a notification won't be sent, namely if the comment author and the moderator are the same user. Or, of the comment author and the recipient of the notification are the same. Its best to test with a guest user, or another Craft user. I've tested the notifications again just to be sure.
All your other assumptions are correct, and the notification behaviour you've outlined is existing functionality. To re-iterate, the following should work:
Comment Made The Moderator would receive a notification that a new comment has been made.
Comment Approved A guest user would receive a notification once their comment is approved. A logged in/register user would receive a notification once their comment is approved.
Comment Reply A guest user would receive a notification if someone replies to their comment once comment is approved. A logged in/register user would receive a notification if someone replies to their comment once >comment is approved.
Moderators Moderators only receive a notification of new/replied to comments for them to approve.
However there is one issue with the moderator approved emails, which is fixed in 1.3.8.
When you mention all emails are being sent to the Moderator, do you mean even the reply notifications?
And can certainly appreciate the confusion. There's a lot of options going on, and as its grown, I've almost backed myself into a corner with naming. The docs can be improved, but updating field settings will have to wait for the next major version for a breaking change. I'll do my best to improve the docs.