Looks like the tac_lite query and custom_price query are combined on the load operation...
user warning: Unknown column 'n.nid' in 'on clause' query: SELECT DISTINCT value FROM profile_values 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 = 0 AND na.realm = 'tac_lite') OR (na.gid = 736 AND na.realm = 'tac_lite'))) AND ( fid = 6 and uid = 86) in /usr/local/www/oursite.com/sites/all/modules/uc_custom_price/uc_custom_price.module(57) : eval()'d code on line 36.
any suggestion on how to run the node access piece first, then the custom price function if access is granted? Or any other solution since I'm just guessing here...
http://drupal.org/project/uc_custom_price
this module allows me to use php code to alter the price based on a user profile field, not sure why this is getting mixed up with the tac_lite
Comments
Comment #1
Dave Cohen commentedLooks like sql is being altered as if it were a query on the node table, when really it a query on the profile_values table. What module generates that query? uc_custom_price? If you disable that module, does the problem go away?
Comment #2
jday commentedTurns out it was the syntax of the query that I wrote (the custom price module lets you use php to adjust pricing). So once I added a table prefix and indicated the primary table, the errors are gone.
original problem query
$result = db_query(db_rewrite_sql("SELECT value FROM {profile_values} WHERE fid = %d and uid = %d", $fid, $user->uid));new corrected query
$result = db_query(db_rewrite_sql("SELECT value FROM {profile_values} pv WHERE pv.fid = %d and pv.uid = %d", "pv","uid"), $fid, $user->uid);reference: http://api.drupal.org/api/drupal/includes!database.inc/function/db_rewri...