I have a view that outputs the following SQL.
SELECT node.nid AS nid,
node.title AS node_title,
node_revisions.body AS node_revisions_body,
node_revisions.format AS node_revisions_format,
value,
profile_values_profile_name.value AS profile_values_profile_name_value,
votingapi_cache_node_sum.value_type AS votingapi_cache_node_sum_value_type
FROM node node
LEFT JOIN votingapi_cache votingapi_cache_node_sum ON node.nid = votingapi_cache_node_sum.content_id AND (votingapi_cache_node_sum.content_type = 'node' AND votingapi_cache_node_sum.function = 'sum')
LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
INNER JOIN users users ON node.uid = users.uid
LEFT JOIN profile_values profile_values_profile_name ON users.uid = profile_values_profile_name.uid AND profile_values_profile_name.fid = '1'
WHERE (node.status <> 0) AND (node.type in ('idea')) AND (node.status <> 0)
ORDER BY node_title ASCAs you can see by the SQL above the "value" in the SELECT is missing the table prefix "votingapi_cache_node_sum.". Interestingly enough though votingapi_cache_node_sum.value_type does have the correct prefix. The problem not having the prefix means that value is in fact ambiguous across the joined tables.
| Comment | File | Size | Author |
|---|---|---|---|
| Picture 2.png | 111.61 KB | exaboy |
Comments
Comment #1
torotil commentedNow that's a really old report. I've picked up maintainership of votingapi last autumn. Is this bug still reproducible with a recent version of views?
Comment #2
torotil commentedComment #3
legolasboDrupal 6 is no longer supported. Closing old issues to clean up the issue queue.
Please reopen and update this issue if this is still an issue in the D7 or D8 version.