Closed (fixed)
Project:
User Tags
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
12 Dec 2006 at 19:25 UTC
Updated:
23 Dec 2006 at 23:48 UTC
On install of user_tags.module, I received the following error
* user warning: Unknown column 'tu.vid' in 'where clause' query: user_tags_user SELECT t.* FROM term_data t INNER JOIN term_user tu WHERE tu.tid = t.tid AND tu.vid = t.vid AND tu.uid = 1 ORDER BY weight, name in C:\www\webroot\socialnet\includes\database.mysql.inc on line 120.
* user warning: Unknown column 'tu.vid' in 'where clause' query: user_tags_user SELECT t.* FROM term_data t INNER JOIN term_user tu WHERE tu.tid = t.tid AND tu.vid = t.vid AND tu.uid = 1 ORDER BY weight, name in C:\www\webroot\socialnet\includes\database.mysql.inc on line 120.
On inspection of the code, I noticed that the term_user table does not have a column named vid. From the user_tags.install file:
CREATE TABLE {term_user} (
tid int(10) unsigned NOT NULL default '0',
uid int(10) unsigned NOT NULL default '0'
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
I also noticed that on line 53 of user_tags.module, there is a query which will fail because the user_tags_vocabulary table only has one column (vid), and no column named "name":
SELECT vu.vid, v.name FROM {user_tags_vocabulary} vu INNER JOIN {vocabulary} v ON v.vid = vu.vid
The user_tags.install file has the following table decription:
CREATE TABLE {user_tags_vocabulary} (
vid INT NOT NULL
) TYPE=MyISAM /*!40100 DEFAULT CHARACTER SET utf8 */;
I will likely patch for myself and resubmit, but I wanted to inform you of the problem as soon as I found it.
Comments
Comment #1
jrc@drupal.org commentedI obviously need to brew some more coffee. That second query from line 53 has no error.
Comment #2
flk commentedsorry i am really trying to get this problem sorted(well i have it ready to be committed)...but i cant seem to be able to commit/login to cvs for some reason....
Comment #3
flk commentedwait a minute, i just did a grap from head and 4.7 branch and the install script are ok, the column in question is in the install file
*scratches head*
closing this unless someone else has similar problem