I've been using the 5.x-2.x-dev version of privatemsg. I noticed today that it had broke in the past week or so. I try to send a message and an error is thrown and the message is not delivered. This is the error I'm getting:

    * user warning: Unknown column 'variables' in 'field list' query: INSERT INTO privatemsg (id, author, recipient, subject, message, timestamp, newmsg, hostname, format, thread, type, variables) VALUES (26, 1, 7, 'chicken', 'chicken subject', 1192037965, 1, '10.4.70.185', 1, 18, 'private-message', 'a:0:{}') in /var/www/html/drupal/includes/database.mysql.inc on line 172.
    * user warning: Unknown column 'p.variables' in 'field list' query: SELECT p.id, u.uid, u.name, p.author, p.timestamp, p.subject, p.message, p.newmsg, p.recipient, p.folder, p.format, p.thread, p.type, p.variables FROM privatemsg p INNER JOIN users u ON p.author = u.uid WHERE p.id = 26 in /var/www/html/drupal/includes/database.mysql.inc on line 172.

Comments

mr.andrey’s picture

I second that - when I try to view a message, I get to following error:

user warning: Unknown column 'p.variables' in 'field list' query: SELECT p.id, u.uid, u.name, p.author, p.timestamp, p.subject, p.message, p.newmsg, p.recipient, p.folder, p.format, p.thread, p.type, p.variables FROM privatemsg p INNER JOIN users u ON p.author = u.uid WHERE p.id = 7 AND (recipient = 2 OR author = 2) in /site.com/includes/database.mysql.inc on line 172.
McPille’s picture

I have the same problem.
I'm using the 11 of Oct. dev. version of subscriptions and the 2nd of Oct. version dev. of privatemsg for drupal 5.2

Andreas

michelle’s picture

It looks like the privatemsg table needs the field "variables" added to it. I looked through the .install file and didn't find it. I added it as longtext and it works. It has another error, though, relating to the autocomplete, but it doesn't prevent the message from sending.

Michelle

bardkerbie’s picture

I did the same as MIchelle; I added the variables field as type text and the error message went away.

mr.andrey’s picture

I confirm this too - extra field "variables" of type "text" added at the end of the "privatemsg" table makes the error messages go away and the module seems to work fine.

Andrey.

manuj_78’s picture

I tried to upgrade the module today and got 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 'TRIGGER user_name_length_insert BEFORE INSERT ON users FOR EACH ROW SET NEW.name' at line 1 query: CREATE TRIGGER user_name_length_insert BEFORE INSERT ON users FOR EACH ROW SET NEW.name_length = LENGTH(NEW.name) in /home/delhiliv/public_html/scratch/includes/database.mysql.inc on line 172.
    * 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 'TRIGGER user_name_length_update BEFORE UPDATE ON users FOR EACH ROW SET NEW.name' at line 1 query: CREATE TRIGGER user_name_length_update BEFORE UPDATE ON users FOR EACH ROW SET NEW.name_length = LENGTH(NEW.name) in /home/delhiliv/public_html/scratch/includes/database.mysql.inc on line 172.

Any help will be greatly appreciated

manuj_78’s picture

Sorry for posting it here. I had to post it in http://drupal.org/node/180549 but made a mistake.

reikiman’s picture

My site has the same behavior .. the following "fixes" the problem. Clearly something equivalent should be in privatemsg.install

mysql> alter table privatemsg add column variables longtext;
Query OK, 930 rows affected (0.28 sec)
Records: 930  Duplicates: 0  Warnings: 0
Zen’s picture

Status: Active » Fixed

The variables field and the update function have now been added to the .install file. There is no update path as this is a development branch. However, as reikiman has stated, the following query should do the trick:
ALTER TABLE privatemsg ADD variables longtext

-K

Zen’s picture

Assigned: Unassigned » Zen

Actually, it might be best to follow these instructions instead.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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