Hello, I have installed the last stable version of this module in both a 6.x and 5.x websites and none of them seem to work. I have checked the logs and there is not trace of Comment Notify there. I had comment mail and akismet comment e-mail activated. Disabled both and still nothing happens when I sign up to receive updates: not when I am logged and not when I am not logged. I have checked the permissions and configurations of the module and everything seems to be working correctly - except that it doesn't send any notification. Any help is greatly appreciated.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

greggles’s picture

That's...quite odd. I'm not sure what to say. The module works for thousands of people :/

Maybe try again on a new installation?

danimatielo’s picture

Is there any other know incompatibility between this and other Drupal modules that maybe could solve the problem? Are the e-mails expected to be sent right away or on cron run?

Thank you for your help,

Dani

greggles’s picture

They should be sent right away. It also performs a "watchdog" for each mail that is sent (which is a bit much, but useful in situations like this).

Can you look in the comment_notify database table and see if there are any records where the notify column is not zero?

Also, it doesn't send notifications for your own comments. Maybe that's what is causing the confusion?

greggles’s picture

Status: Active » Postponed (maintainer needs more info)
SimonVlc’s picture

Same problem here with D6.

I have 5101 rows in the comment_notify table and all with the notify column at 0.

Any idea? Thanks in advance.

greggles’s picture

If they are all at 0 then either nobody is subscribing to notifications or there is a problem with the way that they are being saved.

I don't use 5.x any more so I would have a hard time to debug where the problem is. I suggest trying this a bit more and looking in that database table to see what is or isn't being stored.

SimonVlc’s picture

So, for your words, it must be a problem with the way comment notify on my D6 site saves the "subscription" status on comment submission.

I will take a look tomorrow. Any special thing to look at?

Thanks in advance, Simon.

SimonVlc’s picture

Version: 5.x-2.3 » 7.x-1.x-dev

As noted,

comment notify is not saving in the database the "notify" status, so no one in never notified.

This is the form source code:

<form action="/comment/reply/1276"  accept-charset="UTF-8" method="post" id="comment-form">
<div><div class="form-item">
 <label>Su nombre: </label>
 <a href="/usuarios/testsite" title="Ver perfil de usuario.">testsite</a>
</div>
<div class="form-item" id="edit-comment-wrapper">
 <label for="edit-comment">Comentario: <span class="form-required" title="Este campo es obligatorio.">*</span></label>

 <textarea cols="60" rows="30" name="comment" id="edit-comment"  class="form-textarea required"></textarea>
</div>
<fieldset class=" collapsible collapsed"><legend>Formato de entrada</legend><div class="form-item" id="edit-format-1-1-wrapper">
 <label class="option" for="edit-format-1-1"><input type="radio" id="edit-format-1-1" name="format" value="1"  checked="checked"  class="form-radio wysiwyg wysiwyg-format-1 wysiwyg-editor-fckeditor wysiwyg-field-edit-comment wysiwyg-status-1 wysiwyg-toggle-0 wysiwyg-resizable-1" /> Filtered HTML</label>
 <div class="description"><ul class="tips"><li>You can use <a href="/filter/tips/1#filter-bbcode-0">BBCode</a> tags in the text.</li><li>HTML tags will be transformed to conform to HTML standards.</li><li>You may quote other posts using [quote] tags.</li><li>Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: <em>a, abbr, acronym, code, h1, h2, h3, pre</em>.</li></ul></div>

</div>
<div class="form-item" id="edit-format-2-1-wrapper">
 <label class="option" for="edit-format-2-1"><input type="radio" id="edit-format-2-1" name="format" value="2"   class="form-radio wysiwyg wysiwyg-format-2 wysiwyg-editor-none wysiwyg-field-edit-comment wysiwyg-status-1 wysiwyg-toggle-1 wysiwyg-resizable-1" /> Full HTML</label>
 <div class="description"><ul class="tips"><li>Las direcciones de las páginas web y las de correo se convierten en enlaces automáticamente.</li></ul></div>
</div>
<div class="form-item" id="edit-format-3-1-wrapper">
 <label class="option" for="edit-format-3-1"><input type="radio" id="edit-format-3-1" name="format" value="3"   class="form-radio wysiwyg wysiwyg-format-3 wysiwyg-editor-none wysiwyg-field-edit-comment wysiwyg-status-1 wysiwyg-toggle-1 wysiwyg-resizable-1" /> Texto enriquecido</label>
 <div class="description"><ul class="tips"><li>Las direcciones de las páginas web y las de correo se convierten en enlaces automáticamente.</li><li>Etiquetas HTML permitidas: &lt;a&gt; &lt;p&gt; &lt;span&gt; &lt;div&gt; &lt;h2&gt; &lt;h3&gt; &lt;strike&gt; &lt;img&gt; &lt;hr&gt; &lt;br&gt; &lt;br /&gt; &lt;ul&gt; &lt;ol&gt; &lt;li&gt;  &lt;table&gt; &lt;tr&gt; &lt;td&gt; &lt;em&gt; &lt;u&gt; &lt;em&gt; &lt;strong&gt; &lt;del&gt; &lt;ins&gt; &lt;sub&gt; &lt;sup&gt; &lt;quote&gt; &lt;blockquote&gt; &lt;pre&gt; &lt;code&gt; &lt;cite&gt; &lt;embed&gt; &lt;object&gt; &lt;strike&gt; &lt;caption&gt; &lt;thead&gt; &lt;th&gt; &lt;param&gt; &lt;center&gt;</li><li>Saltos automáticos de líneas y de párrafos.</li><li>Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: <em>a, abbr, acronym, code, h1, h2, h3, pre</em>.</li></ul></div>

</div>
<div class="form-item" id="edit-format-4-1-wrapper">
 <label class="option" for="edit-format-4-1"><input type="radio" id="edit-format-4-1" name="format" value="4"   class="form-radio wysiwyg wysiwyg-format-4 wysiwyg-editor-none wysiwyg-field-edit-comment wysiwyg-status-1 wysiwyg-toggle-1 wysiwyg-resizable-1" /> PHP code</label>
 <div class="description"><ul class="tips"><li>You may post PHP code. You should include &lt;?php ?&gt; tags.</li><li>Saltos automáticos de líneas y de párrafos.</li><li>Las direcciones de las páginas web y las de correo se convierten en enlaces automáticamente.</li><li>Glossary terms will be automatically marked with links to their descriptions. If there are certain phrases or sections of text that should be excluded from glossary marking and linking, use the special markup, [no-glossary] ... [/no-glossary]. Additionally, these HTML elements will not be scanned: <em>a, abbr, acronym, code, h1, h2, h3, pre</em>.</li></ul></div>

</div>
<div class="form-item" id="edit-format-5-1-wrapper">
 <label class="option" for="edit-format-5-1"><input type="radio" id="edit-format-5-1" name="format" value="5"   class="form-radio wysiwyg wysiwyg-format-5 wysiwyg-editor-none wysiwyg-field-edit-comment wysiwyg-status-1 wysiwyg-toggle-1 wysiwyg-resizable-1" /> Texto plano</label>
 <div class="description"><ul class="tips"><li>Etiquetas HTML permitidas: &lt;a&gt; &lt;em&gt; &lt;strong&gt; &lt;cite&gt; &lt;code&gt; &lt;ul&gt; &lt;ol&gt; &lt;li&gt; &lt;dl&gt; &lt;dt&gt; &lt;dd&gt;</li><li>Saltos automáticos de líneas y de párrafos.</li></ul></div>

</div>
<p><a href="/filter/tips">Más información sobre opciones de formato</a></p></fieldset>
<input type="hidden" name="form_build_id" id="form-eff3f1af6e8cae5fe2524a4a4d4018a8" value="form-eff3f1af6e8cae5fe2524a4a4d4018a8"  />
<input type="hidden" name="form_token" id="edit-form-token" value="c7795b31cff03cc551d7f486e7a2c97d"  />
<input type="hidden" name="form_id" id="edit-comment-form" value="comment_form"  />
<div class="clear-block">



<div class="form-item" id="edit-notify-wrapper">
 <label class="option" for="edit-notify"><input type="checkbox" name="notify" id="edit-notify" value="1"   class="form-checkbox" /> Suscríbeme por correo a los comentarios en este hilo</label>
</div>
<input type="hidden" name="notify_type" id="edit-notify-type" value="0"  />
</div>



<input type="submit" name="op" id="edit-preview" value="Previsualizar"  class="form-submit enviarcomentario comm-previa" />
<input type="submit" name="op" id="edit-submit" value="Guardar"  class="form-submit enviarcomentario comm-enviar" />

</div></form>

Any idea of what can be the problem? Thanks in advance!

miche’s picture

+1
No mail being sent to node author.
comment_notify_user_settings has a 1 in node_notify & comment_notify.
Of my two test comments, one has a 1 in notify and notified, the other has a 0.
I have my configuration set to moderation. One of them I approved.
Watchdog has no entries for this module.
Cron has run since approving the comment.
I did check my bulk mail folder.
Using 6.x-1.2.

Sivaji_Ganesh_Jojodae’s picture

Category: support » bug

same thing happens here as #9. I thought there is something wrong on my side after searching the issue queue i came to know that it happens to many of us. I am tempted to mark this as bug. You have set the status to "postponed (maintainer needs more info)" . Please let us know what information you need.

greggles’s picture

The module works fine for me...so, I can't debug this :/

Someone who suffers from it will have to debug themself.

bryancasler’s picture

My emails are also not going out, and I have nothing showing up in my drupal logs.

blakehall’s picture

I've actually experienced the same issue.

Ultimately I found another module has implementing hook_comment and running before comment_notify.

Updating the weight in the system table so our custom module would run after seemed to solve this issue.

greggles’s picture

Very interesting.

It's always a good debugging step to start disabling all the modules on your site one by one to see if that fixes it.

greggles’s picture

Note that #617070: Doesn't record subscription when only one subscription type is enabled (and lots more tests) is a potential cause of the problem - can folks confirm that issue/solution?

barckhoff’s picture

Version: 7.x-1.x-dev » 6.x-1.2

I am also having this problem. I'm running Acquia Drupal (6.14) on BlueHost... it uses comment_notify v. 6.x-1.2. Only the Admin is set to receive comments, and the values in comment_notify_user_settings are all 1 for uid 1. I logged out and added comments anonymously. In comment_notify table, notify = 0 and notified = 0 . No log entries appear about sending notification.

Per #13, I tried changing the weight of comment_notify to -5 in the system table. It didn't help. Tried to uninstall and reinstall the module, it didn't help. Tried adding a new user (not admin user) to receive comment notifications, same results.

The only non-Acquia modules I'm using are:
AddtoAny
Ctools
FLVmediaPlayer
Panels
PorterStemmer
SpamSpan
SWFObject_API
WYSIWIG

greggles’s picture

It's interesting that "notified = 0" for your records. Can other people confirm this?

Do you allow comments to be published directly or do they go into the moderation queue?

@barckhoff - it would also be helpful if you upgraded to the latest 6.x-1.x-dev to see if that fixes the problem for you. Thanks for your help debugging.

barckhoff’s picture

OK, so I just installed the SMTP Authentication module for sending mail and now it sends the emails. Is SMTP (or similar) required for this module? If so, it would be good to add this to the INSTALL.txt file. Or is that some server configuration issue because I'm on a hosted site?? (sorry if I'm a bit clueless, but I'm sure others are too).

However, as it turns out, I had set Authenticated users to be published directly and Anonymous to be sent to the queue. As it turns out, the Authenticated user comment notifications were being sent, but the Anonymous comment notifications were not. When I ticked the "post comments without approval" for Anonymous user Permissions, the email was sent.

So, it seems there's an issue with the queue function.

Will try the dev version & let you know...

greggles’s picture

barkchoff - there is no dependency on smtp but if your site has trouble sending mails then this module will too.

The queueing system should work whenever the queued comments are published, but that capability is relatively new and may not be in 6.x-1.2 version. That's why I suggested trying the 6.x-1.x-dev. I will be making a new official release soon - having more testers report problems is helpful to making sure that it's the right time, so thank you for your help!

Alex Andrascu’s picture

Same problem here. Installed the comment notify + Ajax Comment + Captcha + QueueMail and notification are NOT beeing sent. you can take a look here

http://www.concurs-inspired.ro/mapa/mapa-concurentului-asafti-stefan/gra...

I do have simplenews working on the same website wouldn't that be a problem ?

jahjah92’s picture

same problem here, even with a fresh new installed drupal 6.14 (fr) and 6.x-1.x-dev module : anonym users aren't notyfied :\

I tried multiple configurations, force user to leave their address or optionnal, full rights on comment and module, multiple mail@ for multiple anonymous name => no mail logged in the dblog nor in the mailboxes ?!

ptaff’s picture

Seems the problem comes from line 455 in comment_notify.module (stable 6.x-1.3 version):
if ($mail != $comment_mail && !in_array($mail, $sent_to) && $alert->uid != $comment->uid) {

The last clause of this test checks if the UID to alert is the same as the UID of the poster. Works fine with subscribed users. But, when anonymous replies to anonymous, both are values 0, so no mail is sent.

Replacing by this line:
if ($mail != $comment_mail && !in_array($mail, $sent_to) && (($alert->uid != $comment->uid) || $alert->uid == 0)) {

Seems to fix it for me.

greggles’s picture

Version: 6.x-1.2 » 6.x-1.x-dev
Status: Postponed (maintainer needs more info) » Active

Very interesting. Can other folks try that out and confirm it?

Eugene Fidelin’s picture

subscribe

sbogner@insightcp.com’s picture

I tried the code change from #22 and it didn't work; nothing in the log either. I am not getting mail from registered users; anonymous users are not allowed to comment. On version 6.x-1.3 and using MimeMail 6.x-1.0-alpha1 (which sends email from other areas of the system - Webform, logging alerts, etc).

Sivaji_Ganesh_Jojodae’s picture

Fixed !! #22 trick works on dev release 6.x-1.x-dev (not on stable 6.x-1.2).

jahjah92’s picture

hi ,

i have spent a night to test over, with several scenario : #22 trick works well on 6.x-1.x-dev

however when a user have subscribe one time to all comment , he cannot choose to change for subscribe only on his comment ...
it is perhaps a normal things ?

Another issue (request) , when a mail is send , it will be great to write on db log

finally, "comment notify" is not compatible with "comment mail" , which is another interesting module because authors are notified when comment was made with a "quick approval" link (with options like approve , remove, ban ...) . Nice features and "comment notify" can only notify authors when comment is approval

It's seems that the "comment notify" parameters are not recorded when "comment mail" is enabled ;
I tried to invert the weights on the system table without success :\

good afternoon

sbogner@insightcp.com’s picture

Regarding #25 - that is now resolved. I had earlier used comment_subscribe, and though it was disabled it was not uninstalled. I re-enabled it, then disabled it, and then uninstalled it - and now comment_notify works fine.

greggles’s picture

Very interesting - thanks for the update, sbogner. Anyone else using comment_subscribe should be sure to take all those actions as well and see if that fixes some of the remaining problems.

sbogner@insightcp.com’s picture

A bit of an update on this - there were still some missing email notifications. After more fiddling with things, I uninstalled the SMTP Authentication Support (even though it was not enabled), and that looks to have fixed it completely.

Just a tip, too - when I first tried uninstalling SMTP Authentication Support I got an error about an email wrapper being redeclared, which prevented the uninstall from completing. To fix that, I unchecked 'Use MimeMail for all email' in the MimeMail setup, ran the uninstall on SMTP Authentication Support without error, and then re-checked 'Use MimeMail for all email'.

I hope this fixes it for good!

WildBill’s picture

Per comment #22, it appears that in version 6.x-1.2 the line (#394) was:

if (!empty($author->node_notify_mailalert) && $author->node_notify_mailalert == 1 && $user->mail != $author->mail) {

but was changed to the following in 6.x-1.3 (now line #406):

if (!empty($author->node_notify_mailalert) && $author->node_notify_mailalert == 1 && $user->uid != $author->uid && node_access('view', $node, $author)) {

Was the change from ->mail to ->uid intentional? I thought that you said in http://drupal.org/node/613576 that the code checks to see if the email addresses are the same (to avoid sending a notification to the same person who made the reply) but perhaps I'm misunderstanding...

fozzy’s picture

I hit the same problem and found some (possibly) interesting details.

First, I discovered emails were not sent because I was using Comment Mail module in parallel. Disabling it was effectively not enough. I had to uninstall it to have Comment Notify sending emails correctly.

Second, there was still a problem : users where notified of comments, but I, as the nodes' author, didn't receive notification of comments posted on my nodes. After some investigations, I discovered this was because I had set request for approval on comments. If I authorize users to post comments without approval, then I receive notification emails.

This looks to me like a problem to fix. Because at that stage, as I may not get rid of the approval feature, ... well, I needed to reinstall Comment Mail to do the trick !

Then I found that after reinstalling Comment Mail and giving it a weigh greater than the one of the Comment Notify module in the system table, the things work acceptably. That is, Comment Notify send notification emails to users, and Comment Mail send me notification emails for new comments to be approved.

Nevertheless, if Comment Notify was able to send notification email for comments to be approved (as it should do I think), I wouldn't need Comment Mail anymore and things would be much cleaner....

Hope this helps clarifying the problem.

benone’s picture

+1
module is not working

fozzy’s picture

Regarding comment 32 - I ought to recognize I've been too hasty.
After a lot more investigations and extensive testing, I discovered the silly reason of my problem.

Point was : I, as the nodes' author, was never notified of new comments posted on my nodes when I set the request for approval on comments.
Well the obvious reason was that I was approving new comments myself ! As soon as I'm using another user id to approve comments, Comment Notify does his job and send me a notification email.

As often with such problems it was too simple and obvious to think about it. I had to locate the test on line 406 of comment_notify.module :

if (!empty($author->node_notify_mailalert) && $author->node_notify_mailalert == 1 && $user->uid != $author->uid && node_access('view', $node, $author))

to understand.

So for that wrong point I should really apologize.

Moreover it's consistent that Comment Notify reacts only at approval time. Hence the need of Comment Mail module.

greggles’s picture

Correct. Comment notify is not meant to notify site admins about new comments on their site that are unpublished. I should maybe clarify that on the project page...

benone’s picture

yes bit for me its just not working for a normal user. when i go and put some comment , then I will go again and put another , giving different email address, the first commenter is not notified about the second comment.
what can be wrong ?

greggles’s picture

Lots of things can be wrong ;)

Are you sure your site can consistently send mail? You can use the devel module to log messages to the database log which lets you eliminate mail sending issues from the possible list of problems.

greggles’s picture

Status: Active » Needs review

OK, here's a patch. I plan to commit this soon. Amazingly the simpletests caught this problem and the patch makes them work again. Who'd of thunk it.

benone’s picture

no patch attached :)

greggles’s picture

benone’s picture

Status: Needs review » Reviewed & tested by the community

NOW WORKS :)

greggles’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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