Hello,

First off, I'd like to say i love the module. I can't believe this isn't part of watchdog to begin with...

Anyhow, I'm getting the following SQL error in my logs whenever I change a user's role. If I disable the module, the error goes away.

You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ')' at line 4 query: SELECT DISTINCT u.mail FROM drupal_users u INNER JOIN drupal_users_roles r ON u.uid = r.uid WHERE r.rid IN ()  in /home/writersc/public_html/includes/database.mysql.inc on line 172.

If there is anything else I can provide to help resolve this, please let me know.

Comments

john.money’s picture

Assigned: Unassigned » john.money
Status: Active » Postponed (maintainer needs more info)

Do you have any notify roles configured? I will add code to degrade a little more gracefully in the event there are no notification roles selected in next release.

Kirk’s picture

Ahh, that was in fact the issue. I didn't really want any role to be notified, just for the even to be recorded in the logs. So for the time being i made a dummy role to notify. Good to hear you're going to change that in the future.

Thanks for the reply.

john.money’s picture

Oh. I think I need to write better instructions then. :)

Role Watchdog does two things at the moment (more coming in next release):

1) it writes to the watchdog log ALL roles changes. No configuration is necessary, it will do this "out of the box".

2) it emails *selected* roles when *selected* roles are added or removed. This might be useful if you want to keep a closer eye on certain role changes, such as an Administrator role *hint, hint*.

In your case, it sounds like you have selected roles for "email monitoring" but no roles for "email reporting". If all you want is watchdog logging, you don't need any further configuration.

Hope that helps...

I have modified the module Usage instructions to hopefully be clearer on this point.

john.money’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

Fixed in release 1.2

john.money’s picture

Status: Closed (works as designed) » Closed (fixed)

Marking closed