Closed (fixed)
Project:
Role Watchdog
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
7 Jul 2008 at 23:09 UTC
Updated:
28 Aug 2008 at 17:29 UTC
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
Comment #1
john.money commentedDo 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.
Comment #2
Kirk commentedAhh, 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.
Comment #3
john.money commentedOh. 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.
Comment #4
john.money commentedFixed in release 1.2
Comment #5
john.money commentedMarking closed