I'm using the notifications module to notify users when comments are added. However, I've teste开发者_StackOverflow中文版d it and the emails aren't being sent out. When I try to process the notification queue, I'm getting the following error:
user warning: 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 'type for db_type_placeholder AND send_interval = unsupported type for db_type_pl' at line 1 query: SELECT * FROM notifications_queue WHERE cron = unsupported type for db_type_placeholder AND send_interval = unsupported type for db_type_placeholder ORDER BY module, uid, destination, send_method, send_interval in /home/openupor/public_html/sites/default/modules/notifications/notifications.cron.inc on line 210.
Can anyone tell me how I can go about troubleshooting this? I've had a look at line 210 but this isn't helping me. I'm not sure where to start.
Drupal uses a placeholder system to safely insert variables into SQL without the risk of SQL injection.
example:
$nid = 100;
db_query("SELECT title FROM {node} WHERE nid = %d;", $nid);
will produce the query:
SELECT title FROM {node} WHERE nid = 100;
Now From the error messages, it looks like the variable that was attempted to be inserted into the query was an unsupported type, like fx stdClass
. So the best place to start is to look at what is generating these variables.
You should search the module's issue log to see if other have had this issue and if not, post a bug report. It might not be a bug in notefication, but the module maintainer might be able to give you some fast answers or advice on how to proceed, and it can help others in the same situation.
精彩评论