In Drupal 6, the views definitions that define a relationship based upon a field that has an alias, requires the relationship field to be explicitly specified. In Drupal 7 views, the 'real field' is sufficient to define the relationship field.

To reproduce:
1) Create a view on nodes
2) Add a relationship to webform submission (note singular)
3) Observe the SQL. It isn't necessary to add anything else. The SQL is invalid (check the error log) as follows:

SELECT node.nid AS nid, node.title AS node_title FROM node node LEFT JOIN webform_submissions webform_submissions_node ON <strong>node.webform_submission</strong> = webform_submissions_node.nid WHERE node.type in 'webform') LIMIT 0, 10

This seems related to #1435846: View ajax error when adding a submission link handled by webform_handler_field_submission_link via a relationship, but is completely unrelated. It has nothing to do with the difference in table names between webform_submission and webform_submissions.

Patch forthcoming. No change is needed to the 7.x branches because views 7 will use the existing 'real field' specification.

Comments

DanChadwick’s picture

Status: Active » Fixed
quicksketch’s picture

w00t nice one. And I thought you didn't care about D6? ;)

Thanks for your work on this.

DanChadwick’s picture

Well, I did report it. 2 years ago. ;)

Status: Fixed » Closed (fixed)

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