Hi,

This module has come such a long way. I appreciate all of the hard work that has gone in to it.

From the latest release with 5.2.

* user warning: Unknown column 'type' in 'field list' query: SELECT id, subject, p.timestamp, u.uid, u.name, newmsg, type FROM privatemsg p INNER JOIN users u ON p.author = u.uid WHERE p.recipient = 1 AND folder = 0 AND p.recipient_del = 0 ORDER BY p.timestamp DESC LIMIT 0, 10 in /var/www/html/includes/database.mysql.inc on line 172.
* user warning: Unknown column 'type' in 'field list' query: SELECT DISTINCT type FROM privatemsg WHERE folder = 0 AND recipient_del = 0 AND recipient = 1 in /var/www/html/includes/database.mysql.inc on line 172.

Comments

alippai’s picture

Priority: Normal » Critical

another bug in install file:
privatemsg.install line 46:
db_query("CREATE TABLE {privatemsg_mails} )
db_query("CREATE TABLE {privatemsg_mails} (

alippai’s picture

another bug in install file:
privatemsg.install line 46:
db_query("CREATE TABLE {privatemsg_mails} )
db_query("CREATE TABLE {privatemsg_mails} (

hectorplus’s picture

My old messages are gone after upgrading to the latest. I am this error:
Unknown column 'type' in 'field list' query: SELECT DISTINCT type FROM privatemsg WHERE folder = 0 AND recipient_del = 0 AND recipient = 2

pmcka’s picture

I'm getting the same error and don't see anything in inboxes.

Unknown column 'type' in 'field list' query: SELECT id, subject, p.timestamp, u.uid, u.name, newmsg, type FROM privatemsg p INNER JOIN users u ON p.author = u.uid WHERE p.recipient = 1 AND folder = 0 AND p.recipient_del = 0 ORDER BY timestamp DESC LIMIT 0, 10 in .../database.mysql.inc on line 172

hectorplus’s picture

It appears that the messages are still in the table, however, the module is unable to select the appropriate table.
My messages are gone too.

TheFazz’s picture

is there anyway to revert back to the 1.8 version? i did that and the error messages ceased and the messages re-appeared in the inbox... however, all the links to the messages do not work. not sure what was changed in the mysql tables.

TheFazz’s picture

i also get this error message at the completion of the user edit page:

user warning: Table 'mykart_mykart.main_privatemsg_mails' doesn't exist query: SELECT * FROM main_privatemsg_mails WHERE mailkey = 'user_status_active' in /home/mykart/public_html/drupal5/includes/database.mysql.inc on line 172.
czarphanguye’s picture

TheFazz’s picture

i fixed this by manually creating the privatemsg_mail tables gained from this link:

http://drupal.org/node/165099

CREATE TABLE privatemsg_mails (
  description varchar(255) NOT NULL,
  type varchar(255) NOT NULL,
  subject varchar(255) NOT NULL,
  body varchar(255) NOT NULL,
  notification_subject varchar(255) NOT NULL,
  notification_text_body varchar(255) NOT NULL,
  notification_html_body varchar(255) NOT NULL,
  notification_group_text_body varchar(255) NOT NULL,
  notification_group_html_body varchar(255) NOT NULL,
  mailkey varchar(255) NOT NULL,
  PRIMARY KEY  (mailkey)
) /*!40100 DEFAULT CHARACTER SET utf8 */;


ALTER TABLE `privatemsg` ADD `type` VARCHAR( 255 ) NOT NULL ;
ALTER TABLE `privatemsg` ADD INDEX ( `type` ) ;

seems to work for now. but this is just a workaround.

toma’s picture

its works when we add the mysql code but when view the user page it give this error and the link to send message doesn't show



    * 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 '' at line 1 query: SELECT * FROM users u WHERE in /home/web/site/includes/database.mysql.inc on line 172.
    * user warning: Table 'annoncemarocnet.privatemsg_block_user' doesn't exist query: select count(*) from privatemsg_block_user where author = 0 and recipient = 1 in /home/web/site/includes/database.mysql.inc on line 172.


salvis’s picture

Status: Active » Fixed
Anonymous’s picture

Status: Fixed » Closed (fixed)