Views page is broken after the following code update

$query->addTag('term_access');
Line: 207 (sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc)

Removing the $query->addTag fixed the broken view, I have upgraded to 7.x-3.16 and that didn't fix the bug.

Following is dblog for the error:

PDOException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'tid' in where clause is ambiguous: SELECT td.tid AS tid, REPLACE(td.name, ' ', '-') AS name FROM {taxonomy_term_data} td LEFT OUTER JOIN {taxonomy_vocabulary} tv ON td.vid = tv.vid LEFT OUTER JOIN {taxonomy_term_data} tac_td ON td.tid = tac_td.tid WHERE (tid IN (:db_condition_placeholder_0, :db_condition_placeholder_1, :db_condition_placeholder_2, :db_condition_placeholder_3)) AND (tv.machine_name IN (:db_condition_placeholder_4)) AND( (td.tid IN (:db_condition_placeholder_5)) OR (tac_td.vid NOT IN (:db_condition_placeholder_6)) ); Array ( [:db_condition_placeholder_0] => 52 [:db_condition_placeholder_1] => 54 [:db_condition_placeholder_2] => 55 [:db_condition_placeholder_3] => 58 [:db_condition_placeholder_4] => profile_type [:db_condition_placeholder_5] => 0 [:db_condition_placeholder_6] => 1 ) in views_plugin_argument_validate_taxonomy_term->process_summary_arguments() (line 221 of /sites/all/modules/views/modules/taxonomy/views_plugin_argument_validate_taxonomy_term.inc).

Comments

jozzy_a created an issue. See original summary.

jozzy_a’s picture

Issue summary: View changes
DamienMcKenna’s picture

Status: Active » Postponed (maintainer needs more info)

I'm sorry you've run into that problem. What module(s) are implementing that query tag? It's likely another module improperly modifying the query, but we'd like to know more. Thanks.

jozzy_a’s picture

After much debugging, I think I have found the module which is improperly modifying the query.
The problem module is Tac Lite (http://cgit.drupalcode.org/tac_lite/tree/tac_lite.module#n729), commenting out the left joins fixes the broken views.