Arguments of the fused view generates an error. after looking at the sql generated, simply it doesn't add the prefix (like v9) to the "WHERE" clause of fused view arguement :

in the following example 'node_data_field_ap_ss.field_ap_ss_nid' should be 'v9node_data_field_ap_ss.field_ap_ss_nid':

user warning: Unknown column 'node_data_field_ap_ss.field_ap_ss_nid' in 'where clause' query: SELECT node.nid, node.title AS node_title, node.changed AS node_changed, location.latitude AS location_latitude, location.longitude AS location_longitude, v9node.nid AS v9node_nid, v9node.title AS v9node_title, v9node.changed AS v9node_changed FROM node node LEFT JOIN location location ON node.vid = location.eid LEFT JOIN content_type_ap node_data_field_ap_org_reverse ON node.nid = node_data_field_ap_org_reverse.field_ap_org_nid LEFT JOIN node v9node ON node_data_field_ap_org_reverse.nid = v9node.nid LEFT JOIN content_type_ap v9node_data_field_ap_amount ON v9node.vid = v9node_data_field_ap_amount.vid LEFT JOIN content_type_ap v9node_data_field_ap_ss ON v9node.vid = v9node_data_field_ap_ss.vid WHERE (node.type IN ('org')) AND (v9node.type IN ('ap')) AND (v9node_data_field_ap_amount.field_ap_amount_amount > '0') AND (node_data_field_ap_ss.field_ap_ss_nid = 1) ORDER BY node_title ASC in D:\www\web\includes\database.mysql.inc on line 172.

Comments

hamidrj’s picture

I think the problem is "content_views_argument_handler" @ cck's content_views.inc .
it doesn't add the prefix, well I am not 100% sure. but by replacing

$query->add_where($table .'.'. $main_column['column'] .' = '. $column_placeholder, $arg);

with

$pfxd_table=$table;
if( isset( $query->use_alias_prefix))
$pfxd_table=$query->use_alias_prefix.$table;
$query->add_where($pfxd_table .'.'. $main_column['column'] .' = '. $column_placeholder, $arg);

the problem goes away!

fago’s picture

Status: Active » Fixed

most arguments cause problems, that's why you can find this in the module's README:

* Argument Handlers for fused views are not supported! You may only use argument handlers
on the primary view.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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