Hi,
After installing the Send Module (needed for Mime Mail - to get html email format for my newsletters), when a new user creates an account, they get: Registration successful, You are now logged in.
However, above that green line, there is this big red box that says:

user warning: Unknown column 'mail' in 'where clause' query: UPDATE send_contact SET uid = 17 WHERE mail = 'abc_testing@hotmail.com' in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.module on line 139.

Any advice?
Thanks...

Comments

zinasahib’s picture

Hello again!

I ran update.php and it didn't help!

zinasahib’s picture

Still trying....

I ran update.php with option 1 for the Send Module, here is what I get:

user warning: Table 'send_setting' already exists query: CREATE TABLE send_setting ( name VARCHAR(100) NOT NULL, module VARCHAR(50) NOT NULL DEFAULT '', nodetype VARCHAR(50) NOT NULL DEFAULT '', nid INT NOT NULL DEFAULT 0, value TEXT, PRIMARY KEY(name, module, nodetype, nid) ) /*!40100 DEFAULT CHARACTER SET utf8 */; in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 276.
user warning: Unknown column 'first_name' in 'field list' query: UPDATE send SET name = CONCAT(first_name, ' ', last_name) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 303.
user warning: Unknown column 'first_name' in 'field list' query: UPDATE send_recipient SET name = CONCAT(first_name, ' ', last_name) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 304.
user warning: Can't DROP 'first_name'; check that column/key exists query: ALTER TABLE send DROP COLUMN first_name in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 311.
user warning: Can't DROP 'last_name'; check that column/key exists query: ALTER TABLE send DROP COLUMN last_name in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 312.
user warning: Can't DROP 'first_name'; check that column/key exists query: ALTER TABLE send_recipient DROP COLUMN first_name in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 313.
user warning: Can't DROP 'last_name'; check that column/key exists query: ALTER TABLE send_recipient DROP COLUMN last_name in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 314.
user warning: Unknown column 'uid' in 'where clause' query: UPDATE send_recipient SET rid = uid, rtype = 'user' WHERE uid <> 0 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 319.
user warning: Can't DROP 'uid'; check that column/key exists query: ALTER TABLE send_recipient DROP COLUMN uid in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 320.
user warning: Duplicate column name 'srid' query: ALTER TABLE send_recipient ADD srid INT AUTO_INCREMENT PRIMARY KEY in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 334.
user warning: Duplicate column name 'profile' query: ALTER TABLE send ADD `profile` VARCHAR(50) DEFAULT NULL in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\includes\database.mysql-common.inc on line 298.
user warning: Duplicate column name 'scid' query: ALTER TABLE send ADD `scid` INT unsigned DEFAULT NULL in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\includes\database.mysql-common.inc on line 298.
user warning: Duplicate column name 'contact_count' query: ALTER TABLE send ADD `contact_count` INT DEFAULT NULL in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\includes\database.mysql-common.inc on line 298.
user warning: Unknown column 'uid' in 'field list' query: INSERT INTO send_contact (uid, mode, timestamp) SELECT DISTINCT uid, 'mail', MAX(timestamp) FROM send WHERE uid != 0 GROUP BY uid in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 398.
user warning: Unknown column 'mail' in 'field list' query: INSERT INTO send_contact (uid, mode, timestamp, mail, name) SELECT DISTINCT 0, 'mail', MAX(timestamp), mail, name FROM send WHERE uid = 0 GROUP BY mail, name in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 403.
user warning: Unknown column 's.uid' in 'where clause' query: UPDATE send s, send_contact sc SET s.scid = sc.scid WHERE ( (s.uid = 0 ) AND s.mail = sc.mail) OR ( (s.uid != 0 ) AND s.uid = sc.uid ) in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 409.
user warning: Can't DROP 'uid'; check that column/key exists query: ALTER TABLE send DROP uid in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\includes\database.mysql-common.inc on line 322.
user warning: Can't DROP 'mail'; check that column/key exists query: ALTER TABLE send DROP mail in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\includes\database.mysql-common.inc on line 322.
user warning: Unknown column 'nid' in 'field list' query: INSERT INTO send_node SELECT DISTINCT sid, nid FROM send_recipient_old WHERE nid != 0 in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 418.
user warning: Unknown column 'sr.mail' in 'field list' query: INSERT INTO send_contact (uid, mode, timestamp, name, mail) SELECT DISTINCT 0, 'mail', MAX(s.timestamp), sr.name, sr.mail FROM send_recipient_old sr LEFT JOIN send s USING (sid) LEFT JOIN send_contact sc ON (sr.rid = sc.uid ) WHERE sc.scid IS NULL AND sr.rid = 0 AND sr.rtype = 'user' GROUP BY sr.mail, sr.name, s.sid in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 437.
user warning: Unknown column 'sr.mail' in 'group statement' query: INSERT INTO send_recipient (sid, scid, contact_count) SELECT sr.sid, sc.scid, SUM(sr.rcount) FROM send_recipient_old sr, send_contact sc WHERE sr.rtype = 'user' AND sr.rid != 0 and sr.rid = sc.uid GROUP BY sr.sid, sr.rid, sr.mail in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 467.
user warning: Unknown column 'sr.mail' in 'where clause' query: INSERT INTO send_recipient (sid, scid, contact_count) SELECT sr.sid, sc.scid, SUM(sr.rcount) FROM send_recipient_old sr, send_contact sc WHERE sr.rtype = 'user' AND sr.rid = 0 and sr.mail = sc.mail GROUP BY sr.sid, sr.mail in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 474.
user warning: Unknown column 'sr.mail' in 'group statement' query: INSERT INTO send_recipient (sid, scid, contact_count) SELECT sr.sid, sc.scid, SUM(sr.rcount) FROM send_recipient_old sr, send_contact sc WHERE sr.rtype = 'node' AND sr.rid = 0 and sr.rid = sc.uid GROUP BY sr.sid, sr.rid, sr.mail in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.install on line 481.

The following queries were executed
send module
Update #1
UPDATE {send} SET module='send' WHERE module=''
Failed: CREATE TABLE {send_setting} ( name VARCHAR(100) NOT NULL, module VARCHAR(50) NOT NULL DEFAULT '', nodetype VARCHAR(50) NOT NULL DEFAULT '', nid INT NOT NULL DEFAULT 0, value TEXT, PRIMARY KEY(name, module, nodetype, nid) ) /*!40100 DEFAULT CHARACTER SET utf8 */;
Update #2
ALTER TABLE {send} ADD name VARCHAR(200)
ALTER TABLE {send} ALTER name SET default ''
ALTER TABLE {send_recipient} ADD name VARCHAR(200)
ALTER TABLE {send_recipient} ALTER name SET default ''
Failed: UPDATE {send} SET name = CONCAT(first_name, ' ', last_name)
Failed: UPDATE {send_recipient} SET name = CONCAT(first_name, ' ', last_name)
Failed: ALTER TABLE {send} DROP COLUMN first_name
Failed: ALTER TABLE {send} DROP COLUMN last_name
Failed: ALTER TABLE {send_recipient} DROP COLUMN first_name
Failed: ALTER TABLE {send_recipient} DROP COLUMN last_name
ALTER TABLE {send_recipient} ADD rid INT
ALTER TABLE {send_recipient} ALTER rid SET default 0
ALTER TABLE {send_recipient} ADD rtype VARCHAR(50)
ALTER TABLE {send_recipient} ALTER rtype SET default ''
Failed: UPDATE {send_recipient} SET rid = uid, rtype = 'user' WHERE uid <> 0
Failed: ALTER TABLE {send_recipient} DROP COLUMN uid
ALTER TABLE {send_recipient} ADD rcount INT
Update #3
Failed: ALTER TABLE {send_recipient} ADD srid INT AUTO_INCREMENT PRIMARY KEY
Update #4
ALTER TABLE {send} MODIFY COLUMN sid INT AUTO_INCREMENT
Update #6001
ALTER TABLE {send_recipient} RENAME TO {send_recipient_old}
CREATE TABLE {send_recipient} ( `srid` INT unsigned auto_increment DEFAULT NULL, `scid` INT unsigned DEFAULT NULL, `sid` INT unsigned DEFAULT NULL, `hash` VARCHAR(10) DEFAULT NULL, `contact_count` INT unsigned NOT NULL DEFAULT 1, `open` TINYINT NOT NULL DEFAULT 0, `click` INT unsigned NOT NULL DEFAULT 0, PRIMARY KEY (srid), INDEX send_recipient_hash_idx (hash) ) /*!40100 DEFAULT CHARACTER SET UTF8 */
Failed: ALTER TABLE {send} ADD `profile` VARCHAR(50) DEFAULT NULL
ALTER TABLE {send} CHANGE `profile` `profile` VARCHAR(50) NOT NULL
UPDATE {send} SET profile = module
ALTER TABLE {send} DROP module
Failed: ALTER TABLE {send} ADD `scid` INT unsigned DEFAULT NULL
Failed: ALTER TABLE {send} ADD `contact_count` INT DEFAULT NULL
ALTER TABLE {send_contact} ADD `mail` VARCHAR(64) DEFAULT NULL
ALTER TABLE {send_contact} ADD `name` VARCHAR(100) DEFAULT NULL
Failed: INSERT INTO {send_contact} (uid, mode, timestamp) SELECT DISTINCT uid, 'mail', MAX(timestamp) FROM {send} WHERE uid != 0 GROUP BY uid
Failed: INSERT INTO {send_contact} (uid, mode, timestamp, mail, name) SELECT DISTINCT 0, 'mail', MAX(timestamp), mail, name FROM {send} WHERE uid = 0 GROUP BY mail, name
Failed: UPDATE {send} s, {send_contact} sc SET s.scid = sc.scid WHERE ( (s.uid = 0 ) AND s.mail = sc.mail) OR ( (s.uid != 0 ) AND s.uid = sc.uid )
Failed: ALTER TABLE {send} DROP uid
Failed: ALTER TABLE {send} DROP mail
ALTER TABLE {send} DROP name
Failed: INSERT INTO {send_node} SELECT DISTINCT sid, nid FROM {send_recipient_old} WHERE nid != 0
INSERT INTO {send_contact} (uid, mode, timestamp) SELECT DISTINCT sr.rid, 'mail', MAX(s.timestamp) FROM {send_recipient_old} sr LEFT JOIN {send} s USING (sid) LEFT JOIN {send_contact} sc ON (sr.rid = sc.uid ) WHERE sc.scid IS NULL AND sr.rid != 0 AND sr.rtype = 'user' GROUP BY sr.rid
Failed: INSERT INTO {send_contact} (uid, mode, timestamp, name, mail) SELECT DISTINCT 0, 'mail', MAX(s.timestamp), sr.name, sr.mail FROM {send_recipient_old} sr LEFT JOIN {send} s USING (sid) LEFT JOIN {send_contact} sc ON (sr.rid = sc.uid ) WHERE sc.scid IS NULL AND sr.rid = 0 AND sr.rtype = 'user' GROUP BY sr.mail, sr.name, s.sid
INSERT INTO {send_contact_mail} (scid, mail, name) SELECT DISTINCT sc.scid, u.mail, u.name FROM {send} s LEFT JOIN {send_contact} sc USING (scid) LEFT JOIN {users} u using (uid) GROUP BY u.uid
UPDATE {send_contact_mail} scm, {send_contact} sc, {users} u SET scm.mail = u.mail, scm.name = u.name WHERE sc.uid != 0 AND sc.uid = u.uid AND scm.scid = sc.scid
INSERT INTO {send_contact} (uid, mode, timestamp) SELECT DISTINCT 0, 'mlm', MAX(s.timestamp) FROM {send_recipient_old} sr LEFT JOIN {send} s USING (sid) LEFT JOIN {send_contact} sc ON (sr.rid = sc.uid ) WHERE sc.scid IS NULL AND sr.rid != 0 AND sr.rtype = 'node' GROUP BY sr.rid
Failed: INSERT INTO {send_recipient} (sid, scid, contact_count) SELECT sr.sid, sc.scid, SUM(sr.rcount) FROM {send_recipient_old} sr, {send_contact} sc WHERE sr.rtype = 'user' AND sr.rid != 0 and sr.rid = sc.uid GROUP BY sr.sid, sr.rid, sr.mail
Failed: INSERT INTO {send_recipient} (sid, scid, contact_count) SELECT sr.sid, sc.scid, SUM(sr.rcount) FROM {send_recipient_old} sr, {send_contact} sc WHERE sr.rtype = 'user' AND sr.rid = 0 and sr.mail = sc.mail GROUP BY sr.sid, sr.mail
Failed: INSERT INTO {send_recipient} (sid, scid, contact_count) SELECT sr.sid, sc.scid, SUM(sr.rcount) FROM {send_recipient_old} sr, {send_contact} sc WHERE sr.rtype = 'node' AND sr.rid = 0 and sr.rid = sc.uid GROUP BY sr.sid, sr.rid, sr.mail
UPDATE {send} s SET contact_count = (SELECT SUM(contact_count) FROM {send_recipient} sr WHERE sr.sid = s.sid)
INSERT INTO {send_contact_mail} (scid, name, mail) SELECT scid, name, mail FROM send_contact WHERE mode = 'mail'
ALTER TABLE {send_contact} DROP mail
ALTER TABLE {send_contact} DROP name
DROP TABLE {send_recipient_old}
Update #6002
No queries
Update #6003
No queries
Update #6004
No queries
Update #6005
No queries

zinasahib’s picture

Assigned: Unassigned » zinasahib
Status: Active » Fixed

Ok, I found a solution:
The warning simply says:

user warning: Unknown column 'mail' in 'where clause' query: UPDATE send_contact SET uid = 17 WHERE mail = 'abc_testing@hotmail.com' in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\send\send.module on line 139.

Looking into that file, same line, I find the following in code line #139:

SET uid = %d WHERE mail = '%s'", $user->uid, $user->mail);

All I did was change mail to 'mail' , so it identifies it as the column mail, just as it is referred too later on, like for example in lines 183 / 189.

Now when I register using a test account, I don't see this warning anymore. I tested it further by logging in as admin and looking into the users list, the new account has been created.

Moving on to solve other issues.....

zinasahib’s picture

Assigned: zinasahib » Unassigned
Status: Fixed » Active

Hi again,

I was just thinking of something:
when I went over the code again:

if (!$user->mail) return;
db_query("UPDATE {send_contact}
SET uid = %d WHERE 'mail' = '%s'", $user->uid, $user->mail);
return;

Well, what about the other "Mail"s? I tested it one more time with a new account, and I am still waiting for the admin generic email confirmation which usually comes quickly, so I guess my solution does not work.

Any ideas?

tsaw’s picture

Hi - I too am experiencing this same problem... Did you get it fixed on your end?

Thanks!

Tim

zinasahib’s picture

Nope -
Still waiting for an answer :-<
I just removed the warnings from appearing to users for the time being.

buzzman’s picture

any updates to this? bump ...

Tafa’s picture

same situation here. Any options for us to deactivate the red message at least.
Thanks
T

collinsricki’s picture

Bump from me.

Someones super brain help with this would be greatly appreciated as its looking rather bad for me at the moment :)

Berdir’s picture

There is no mail column in that table, so that query does not make any sense. I don't know the module and just stumbled over the issue, but it should be save to simply comment out that line.

Allie Micka’s picture

Version: 6.x-1.0-alpha2 » master

This is fixed in HEAD, and the next release will include the fix.

Thanks!

Allie Micka’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

d.sibaud’s picture

Priority: Critical » Normal
Status: Closed (fixed) » Active

in the alpha 3 the issue is still active

milziv’s picture

Hi there,

yes, I can confirm that this issue is still active in the recommended version of the Send module, 6.x-1.0-alpha3.
Please would you advise on any workaround on this, or shall I install the development version 6.x-1.x-dev to rectify this problem.

Thanks!

vcardoso’s picture

Version: master » 6.x-1.x-dev
Component: User interface » Code

The problem still exists on the stable version and also on the development version.
It works correctly, but it may induce on a user a feeling of incertitude regarding the operation and gives a really bad image of a website on a moment as important as registering onto it!

Allie Micka’s picture

Status: Active » Closed (fixed)

alpha3 precedes the fix. Please check out alpha4 or higher, when available, and update this if you're still having drama.

Thanks!

joris.verschueren’s picture

(wanted to reply to #8) check your error log settings, you can stipulate that error logs only appear to administrators