Hi,

I created a view to list nodes based on taxonomy terms. So I added two
arguments base on taxonomy terms.

When trying the path with one argument it works fine, however when using
both arguments I get this error:

* warning: pg_query() [function.pg-query]: Query failed: ERROR: column term_data.name does not exist LINE 7: WHERE (node.type in ('ancien_eleve')) AND (term_data.name =... ^ in /usr/share/drupal6/includes/database.pgsql.inc on line 139.
* user warning: query: SELECT node.nid AS nid, node.title AS node_title FROM node node LEFT JOIN term_node term_node ON node.vid = term_node.vid LEFT JOIN term_node term_data ON node.vid = term_data.vid LEFT JOIN term_data term_data__term_data ON term_data.tid = term_data__term_data.tid AND term_data__term_data.name != 'moyen' WHERE (node.type in ('ancien_eleve')) AND (term_data.name = 'moyen') AND (term_data__term_data.name = 'femme') LIMIT 10 OFFSET 0 in /usr/local/share/drupal/modules/views/includes/view.inc on line 755.

My first taxonomy argument is based on gender, the second on type. So my
view display path looks like "mypath/femme/moyen".

The URL is:

http://cours-simon.zenon.apartia.fr/anciens/moyen/femme

Comments

noah977’s picture

Version: 6.x-2.6 » 6.x-3.x-dev
Priority: Normal » Critical

I can confirm this error and provide a bit more information about the issue.

I have two vocabularies, and want to select results based on both. i.e. example.com/los-angeles/restaruants

Looking at the generated Query, it appears as if the module is creating a bad field name in the SQL.

"WHERE (term_data.name = 'los angeles') AND (term_data__term_data.name = 'restaurants')"

The filed should be "term_data.name" but note the second use is "term_data__term_data.name" It appears as if the module is adding the table name a second time. (Perhaps because this is my second use of a term argument?)

dagmar’s picture

Status: Active » Postponed (maintainer needs more info)

Can you confirm that this bug is present in the last 2.x and 3.x version of views?

If yes, please export your views.

dagmar’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

#572248: Mark "won't fix" any open issue that does not conform to the submission guidelines

Your issue has been left marked "Postponed, maintainer needs more info" for more than 30 days.