This applies if you allow anonymous comments on your site.

If you set the default user settings to automatically watch and send emails when a user comments, then watcher tries to send notifications to uid 0 after an anonymous user posts a comment. The net result is that it logs an error in watchdog and the email never leaves the watcher_notify_queue table because uid 0 does not have an email address.

I looked in the database and uid 0 is in the watcher_user_settings table, so I disabled the automatic updates for that specific user and it seems to fix the problem. The module should do this on install.

UPDATE  watcher_user_settings 
SET  automatic_enable_notifications = 0, notifications_new_comments = 0, autowatch_commented_on = 0, autowatch_posted = 0, custom = 1
WHERE  watcher_user_settings.uid = 0

But it also raises the issue that anonymous commenters are required to leave an email address when commenting, so with some refactoring it might be possible to email the notification to the address they leave when posting.

Comments

solipsist’s picture

I never intended anonymous users to use Watcher so this was never really attempted or tested. Thanks for the information. I'll fix this in the next release.

solipsist’s picture

Status: Needs work » Fixed

I've fixed this issue.

Regarding notifying anonymous posters, it can certainly be done and it's a good idea; I'll keep it on the todo list!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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