SQL Error

sparq-l - July 7, 2008 - 23:09
Project:Role Watchdog
Version:5.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:John Money
Status:closed
Description

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.

#1

John Money - July 23, 2008 - 21:38
Assigned to:Anonymous» 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.

#2

sparq-l - July 24, 2008 - 03:21

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.

#3

John Money - July 24, 2008 - 16:11

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.

#4

John Money - August 28, 2008 - 17:28
Status:postponed (maintainer needs more info)» by design

Fixed in release 1.2

#5

John Money - August 28, 2008 - 17:29
Status:by design» closed

Marking closed

 
 

Drupal is a registered trademark of Dries Buytaert.