I've recently switched from MySQL do PostgreSQL drived Drupal. I'm using workflow for content creation management. In views, I'm filtering the certain node type (project) using workflow state:

SELECT DISTINCT(node.nid) AS nid FROM node node LEFT JOIN workflow_node workflow_node ON node.nid = workflow_node.nid  WHERE (node.type in ('project_project')) AND (workflow_node.sid = 2)  GROUP BY nid

This query fails with error: column reference "nid" is ambiguous. I'm not fluent with Views API, but I guess, the issue I'm reporting could be fixed somehow in Workflow Views handlers, responsible for SQL query creation. What I observe is:
- switching off distinct node selection fix the problem, i.e. the query fails due to SELECT DISTINCT(node.nid) AS nid
statement
- changing the grouping to GROUP BY node.nid also fix the problem.

So, I think, the best thing would be to group by node.nid, but I have no idea where to put the proper change in workflow views handlers..

Comments

josh waihi’s picture

Priority: Normal » Minor
Status: Active » Closed (duplicate)