Since updating to 1.2 I get a rather nasty sql error which is logged whenever anyone who is not an administrator tries to access the Dashboard.

The error is:


Unknown column 'n.nid' in 'on clause' query: SELECT a.nid, c.csid, Count(1) AS numberOfCases FROM node AS a Inner Join casetracker_case AS b ON (a.nid = b.pid) Inner Join node AS d ON (b.vid = d.vid) Inner Join casetracker_case_states AS c ON (b.case_status_id = c.csid) INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'term_access') OR (na.gid = 19 AND na.realm = 'term_access') OR (na.gid = 22 AND na.realm = 'term_access'))) AND ( a.type IN ("casetracker_basic_project ") AND a.status = 1 ) GROUP BY a.nid, c.csid ORDER BY a.title ASC, c.csid ASC in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\includes\database.mysqli.inc on line 151.

The Dashboard will open, but it shows no cases.

Comments

dinis’s picture

Curiously,

I've tried installing 1.2 on a fresh Drupal build on my test server and get the following errors when accessing the Dashboard as Admin.

user warning: Unknown column 'weight' in 'field list' query: SELECT csid, case_state_name, case_state_realm, weight FROM casetracker_case_states ORDER BY weight in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\includes\database.mysqli.inc on line 151. 

warning: Invalid argument supplied for foreach() in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\modules\casetracker\casetracker.module on line 554. 

I've tried dowlonading the Case Tracker again module incase it was corrupt in some way, but no difference.

The only difference between the test server and live is the test server is running Drupal 5.3 where production is Drupal 5.2.

zero2one’s picture

You have to run the update.php script and select the last update version (21) to fix this bug.

I change the install function now!

zero2one’s picture

Status: Active » Fixed

Is fixed in cvs, will be in the next (bugfix) release

dinis’s picture

Status: Active » Fixed

Many thanks for the fast response, that certainly fixes the issue on the test site. Unfortunately on my production environment I still get this error in the log where anyone who is not an admin tries to access the Dashboard:

Unknown column 'n.nid' in 'on clause' query: SELECT a.nid, c.csid, Count(1) AS numberOfCases FROM node AS a Inner Join casetracker_case AS b ON (a.nid = b.pid) Inner Join node AS d ON (b.vid = d.vid) Inner Join casetracker_case_states AS c ON (b.case_status_id = c.csid) INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'term_access') OR (na.gid = 19 AND na.realm = 'term_access') OR (na.gid = 22 AND na.realm = 'term_access'))) AND ( a.type IN ("casetracker_basic_project ") AND a.status = 1 ) GROUP BY a.nid, c.csid ORDER BY a.title ASC, c.csid ASC in C:\Program Files\Apache Software Foundation\Apache2.2\htdocs\includes\database.mysqli.inc on line 151.

I'm beginning to wonder if my database has become corrupt in some way.

dinis’s picture

Status: Fixed » Active
zero2one’s picture

Is fixed in the casetracker 5.x-1.3-beta1 release.

dinis’s picture

Confirmed and fixed, many thanks. I've tested the 1.3 beta on my production site and that's fixed too, cheers.

zero2one’s picture

zero2one’s picture

Status: Fixed » Closed (fixed)

Closed