Needs review
Project:
Conference
Version:
6.x-1.2-beta1
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
21 Jan 2009 at 02:08 UTC
Updated:
13 Jul 2009 at 10:56 UTC
Jump to comment: Most recent file
Installed the conference module in a Drupal 6.9 installation. When I go to Manage Conference, I see the following SQL error in a big pink box:
user warning: Unknown column 'c.pvid' in 'where clause' query: SELECT COUNT(*) FROM node n LEFT JOIN conference c ON n.nid = c.pnid WHERE n.type='conference_paper' AND (c.pvid = n.vid OR c.pvid is NULL OR c.pvid = (SELECT max(c.pvid) FROM conference c WHERE c.pnid = n.nid)) in /home/self/public_html/sites/all/modules/conference/conference.module on line 591.
Looking in the conference table in the DB, I don't see any pvid column, nor do I see where it would be created in the conference.install file
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | conference.module.test | 116 KB | wisniewski |
Comments
Comment #1
sam.foster commentedHi
I'm using version 6.6 and I also get this error
--- snip ----
warning: pg_query() [function.pg-query]: Query failed: ERROR: column c.pvid does not exist in /usr/share/drupal/includes/database.pgsql.inc on line 138.
user warning: query: SELECT COUNT(*) FROM node n LEFT JOIN conference c ON n.nid = c.pnid WHERE n.type='conference_paper' AND (c.pvid = n.vid OR c.pvid is NULL OR c.pvid = (SELECT max(c.pvid) FROM conference c WHERE c.pnid = n.nid)) in /export/var/drupal/webteam.bangor.ac.uk/modules/conference/conference.module on line 591.
--- snip ----
and it appears on the Manage Conference page and I also get this message
---- snip ----
warning: pg_query() [function.pg-query]: Query failed: ERROR: argument of OR must be type boolean, not type integer in /usr/share/drupal/includes/database.pgsql.inc on line 138.
user warning: query: INSERT INTO node_access (nid, gid, realm, grant_view, grant_update, grant_delete) SELECT DISTINCT n.nid, n.uid, 'conference', 1, !(c.ruid OR d.decision), !(c.ruid OR d.decision) FROM node n LEFT JOIN conference c ON n.nid = c.pnid LEFT JOIN conference_decision d ON d.pnid = n.nid WHERE n.type = 'conference_paper' in /export/var/drupal/webteam.bangor.ac.uk/modules/conference/conference.admin.inc on line 350.
--- snip -----
on this page
admin/settings/conference
when I do stuff relating to the 'node permissions' such as clicking on the 'update the permissions table' button.
If I disable 'conference node permissions' the warning message doesn't appear on the admin/settings/conference page.
However I still get the messages on the Manage Conference page.
Comment #2
jeannine commentedI'm getting similar warnings:
on the create paper page:
user warning: Unknown column 'c.pvid' in 'where clause' query: SELECT count(*) FROM conference c, node n where c.pnid = n.nid and c.pvid = n.vid AND n.nid = 0 in /www/share/htdocs/ASF/pi_symp/sites/all/modules/contrib/conference/conference.module on line 1461.
In manage conference:
* user warning: Unknown column 'c.pvid' in 'where clause' query: SELECT COUNT(*) FROM node n LEFT JOIN conference c ON n.nid = c.pnid WHERE n.type='conference_paper' AND (c.pvid = n.vid OR c.pvid is NULL OR c.pvid = (SELECT max(c.pvid) FROM conference c WHERE c.pnid = n.nid)) in /www/share/htdocs/ASF/pi_symp/sites/all/modules/contrib/conference/conference.module on line 591.
* user warning: Unknown column 'c.pvid' in 'where clause' query: SELECT * FROM node n LEFT JOIN conference c ON n.nid = c.pnid WHERE n.type='conference_paper' AND (c.pvid = n.vid OR c.pvid is NULL OR c.pvid = (SELECT max(c.pvid) FROM conference c WHERE c.pnid = n.nid)) ORDER BY n.created DESC LIMIT 0, 25 in /www/share/htdocs/ASF/pi_symp/sites/all/modules/contrib/conference/conference.module on line 591.
what should I do??
Comment #3
jeannine commentedPS when I disabled node permissions it made no difference for me....
Comment #4
wisniewski commentedHi,
I agree that this module is worth working and spend a little time to find out what these errors are. Most of them are due to oversight in spelling or code.
A few things:
admin, author, rev ROLE can not have ' ' (space) in name
things to do in data base, TABLE conference
add pvid column:
ALTER TABLE `conference` ADD `pvid` INT NOT NULL AFTER `rnid` ;
things to do in code:
(line 1461)
$sql = "SELECT COUNT(*) FROM { conference } c, { node } n where c.pnid = n.nid and c.pvid = n.vid AND n.nid = %d";
change to (remove spaces in {})
$sql = "SELECT COUNT(*) FROM {conference} c, {node} n where c.pnid = n.nid and c.pvid = n.vid AND n.nid = %d";
Now users can input papers without warning.
Comment #5
wisniewski commentedFew more things by searching "_}"
I attach correct one.
Comment #6
jeannine commentedThank you! Everything is working perfectly now!!!
Comment #7
zyxware commentedHello All
I am back, I was out for about 3 weeks I will look into the patches and update shorty. Thank You for your patience.
Regards
Zyxware
Comment #8
zyxware commentedI checked up on the issue it seems the updated schema for the conference module was not provided with the ".install" file, I will update it and commit back to the repository shortly.
Regards
Zyxware
Comment #9
zyxware commentedHello All
The "conference.install" file has been patched and put back into the CVS repository. For all the people who are facing this error, please Drop the existing table called "conference"
DROP TABLE conference;And recreate the table using the following query
Let me know if you are having any other issues.
In the original release I forgot to update the SQL query in the install file, that is how the issue occurred.
Sorry for inconvenience.
Regards
Zyxware
Comment #10
zyxware commentedComment #11
sebastiano.moruzzi commentedThough papers have been submitted to the conference, in "Manage Conference" I don't see any paper to assign reviews and I have the following error message (I have installed the last version of June 2009):
* user warning: Unknown column 'c.pvid' in 'where clause' query: SELECT COUNT(*) FROM node n LEFT JOIN conference c ON n.nid = c.pnid WHERE n.type='conference_paper' AND (c.pvid = n.vid OR c.pvid is NULL OR c.pvid = (SELECT max(c.pvid) FROM conference c WHERE c.pnid = n.nid)) in /home/gulliver/public_html/cogito/sites/default/modules/conference/conference.module on line 591.
* user warning: Unknown column 'c.pvid' in 'where clause' query: SELECT * FROM node n LEFT JOIN conference c ON n.nid = c.pnid WHERE n.type='conference_paper' AND (c.pvid = n.vid OR c.pvid is NULL OR c.pvid = (SELECT max(c.pvid) FROM conference c WHERE c.pnid = n.nid)) ORDER BY n.created DESC LIMIT 0, 25 in /home/gulliver/public_html/cogito/sites/default/modules/conference/conference.module on line 591.