For some reason, only the Admin account can view the station>program listing. From any other account (even when given admin permissions for the station module) I get the following:

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 count( DISTINCT(node.nid)) FROM node node LEFT JOIN station_program station_program ON node.vid = station_program.vid INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'workflow_access') OR (na.gid = 5 AND na.realm = 'workflow_access') OR (na.gid = 7 AND na.realm = 'workflow_access') OR (na.gid = 4 AND na.realm = 'workflow_access_owner'))) AND ( (node.type IN ('station_program')) AND (node.status = '1') AND (EXISTS (SELECT * FROM station_schedule_item INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'workflow_access') OR (na.gid = 5 AND na.realm = 'workflow in /var/www/html/cpbn/includes/database.mysql.inc on line 172.

I can see that it is referencing workflow in here, so it is possible the problem isn't with the station modules, but this is the only one I've noticed it for.

Comments

drewish’s picture

what's the URL that this is coming up on? i think you might be right that it's a problem with workflow...

whyameye’s picture

We are having a MYSQL error on schedule -> programs as well. The error only shows up for Anonymous users and looks like this:

* 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 count( DISTINCT(node.nid)) FROM node node LEFT JOIN station_program station_program ON node.vid = station_program.vid INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( (node.type IN ('program')) AND (node.status = '1') AND (EXISTS (SELECT * FROM station_schedule INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( station_schedule.program_nid = node.nid)) ) in /var/www/html/wsuir-drupal5.2/includes/database.mysql.inc on line 172.
* 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 'ORDER BY node_title ASC LIMIT 0, 50' at line 1 query: SELECT DISTINCT(node.nid), node.title AS node_title, node.changed AS node_changed, station_program.genre AS station_program_genre FROM node node LEFT JOIN station_program station_program ON node.vid = station_program.vid INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( (node.type IN ('program')) AND (node.status = '1') AND (EXISTS (SELECT * FROM station_schedule INNER JOIN node_access na ON na.nid = node.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 0 AND na.realm = 'og_public'))) AND ( station_schedule.program_nid = node.nid)) ) ORDER BY node_title ASC LIMIT 0, 50 in /var/www/html/wsuir-drupal5.2/includes/database.mysql.inc on line 172.

our site is:
http://cratel.wichita.edu/wsuir-drupal5.2/?q=station/programs

underneath it says there are no scheduled programs. I am wondering if kpsu.org is experiencing an error in schedule -> programs as well as their site also says they have no scheduled programs:
http://kpsu.org/station/programs

and I saw a mysql error for KGSM as well:
http://blackbird.kgsm.gac.edu/beta/station/programs

drewish’s picture

Category: support » bug

ah, good call... anon does seem to have some problem. i'll look at this tomorrow.

drewish’s picture

marked http://drupal.org/node/174637 as a duplicate.

drewish’s picture

Status: Active » Needs review
StatusFileSize
new1.61 KB

it looks like the bug is due some node access rewriting of station_handler_filter_is_scheduled()'s sub query. give this a whirl.

drewish’s picture

Status: Needs review » Fixed
StatusFileSize
new1.57 KB

committed the patch on #5 to HEAD and the attached to DRUPAL-5.

Anonymous’s picture

Status: Fixed » Closed (fixed)
drewish’s picture

Version: 5.x-2.x-dev » 5.x-1.x-dev
Status: Closed (fixed) » Needs review
StatusFileSize
new1.06 KB
drewish’s picture

marked http://drupal.org/node/193030 as a duplicate

drewish’s picture

Status: Needs review » Fixed

committed #8 to DRUPAL-5

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.