Closed (fixed)
Project:
Mail
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
2 Oct 2004 at 03:48 UTC
Updated:
21 Nov 2004 at 18:16 UTC
I'm using 4.5RC. When the node is submitted without selecting a role to email, rather than getting a message instructing me to selecdt a role, I get a series of SQL errors (see below). However, even though no roles were selected, the email is still sent (to "authenticated users", perhaps other roles too--and the node added.)
user error: 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 ') ORDER BY name' at line 1
query: SELECT name FROM role WHERE () ORDER BY name in /home/drupal/includes/database.mysql.inc on line 125.
warning: Invalid argument supplied for foreach() in /home/drupal/modules/mail.module on line 198.
user error: 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 ') ORDER BY name' at line 1
query: SELECT name FROM role WHERE () ORDER BY name in /home/drupal/includes/database.mysql.inc on line 125.
warning: Cannot modify header information - headers already sent by (output started at /home/drupal/includes/common.inc:402) in /home/drupal/includes/common.inc on line 217.
Comments
Comment #1
nedjoI hadn't updated the form error handling to 4.5. I've now done so, but there are two remaining problems: (1) the form is validated, and fails, on first bringing it up (e.g., clicking create content > mail) and so displays an error message and doesn't display the submit button; (2) the settings for which roles to send to aren't saved when previewing, so when you preview and then submit you have to first reset the roles. Anyone see the source of these two problems?
Comment #2
nedjoPatch submitted by arevos solved issue of saving role settings over preview.
Comment #3
xolotl commentedWhile arevos's patch does fix the issue of the selected role being passed to preview, using drupal HEAD and mail HEAD as of 11/6/2004 and I'm still getting errors when submitting a mail node without a role selected, though it does send the mail to every auth user. Error follows:
Fatal error: 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 ') ORDER BY name' at line 1 query: SELECT name FROM role WHERE () ORDER BY name in /home/mediaped/public_html/projects/svhe/includes/database.mysql.inc on line 125Comment #4
(not verified) commented