简体   繁体   English

没有发送Drupal通知电子邮件

[英]Drupal notification emails not getting sent

I'm using the notifications module to notify users when comments are added. 我正在使用通知模块在添加评论时通知用户。 However, I've tested 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; 用户警告:您的SQL语法有误; 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. 在第1行查询中,检查与您的MySQL服务器版本相对应的手册以获取正确的语法,以在'db_type_placeholder的类型和send_interval = db_type_pl的不受支持的类型'附近使用:SELECT * FROM notifications_queue WRONE cron = db_type_placeholder的不受支持的类型AND send_interval =不支持的类型对于db_type_placeholder ORDER BY模块,uid,目标,send_method,send_interval,位于第210行的/home/openupor/public_html/sites/default/modules/notifications/notifications.cron.inc中。

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. 我看过第210行,但这对我没有帮助。 I'm not sure where to start. 我不确定从哪里开始。

Drupal uses a placeholder system to safely insert variables into SQL without the risk of SQL injection. Drupal使用占位符系统将变量安全地插入SQL中,而没有SQL注入的风险。

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 . 现在,从错误消息看,试图插入查询中的变量似乎是不受支持的类型,例如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. 这可能不是说明问题,但是模块维护人员可能会为您提供一些快速的答案或建议,以帮助您进行下一步操作,并且可以在相同情况下帮助其他人。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM