Unknown column 'type' in pm

jwilde - August 1, 2007 - 15:05
Project:Privatemsg
Version:5.x-2.x-dev
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

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.

#1

alippai - August 1, 2007 - 17:16
Priority:normal» critical

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

#2

alippai - August 1, 2007 - 17:16

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

#3

hectorplus - August 3, 2007 - 06:23

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

#4

pmcka - August 10, 2007 - 16:07

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

#5

hectorplus - August 11, 2007 - 01:40

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.

#6

TheFazz - August 11, 2007 - 01:43

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.

#7

TheFazz - August 11, 2007 - 06:35

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.

#8

czarphanguye - August 11, 2007 - 12:33

#9

TheFazz - August 12, 2007 - 10:54

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.

#10

toma - August 14, 2007 - 17:50

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.

#11

salvis - August 27, 2007 - 23:49
Status:active» fixed

http://drupal.org/node/167756

#12

Anonymous - September 10, 2007 - 23:51
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.