See here: http://drupalcode.org/project/views.git/blob/HEAD:/handlers/views_handle...

if (!empty($field->field_alias) && !empty($field->field_alias)) {
  $fields[] = "$field->table_alias.$field->real_field";
}

I'm not crazy here, right?

CommentFileSizeAuthor
#5 interdiff.txt673 bytesjoelpittet
#5 1944150-5.patch673 bytesjoelpittet
#3 views-duplicateif-1944150-3.patch672 bytesesmerel
PASSED: [[SimpleTest]]: [MySQL] 1,627 pass(es). View
#2 views-duplicateif-1944150-2.patch0 bytesesmerel
PASSED: [[SimpleTest]]: [MySQL] 1,627 pass(es). View
Members fund testing for the Drupal project. Drupal Association Learn more

Comments

dawehner’s picture

Right, this should be $field->table_alias. I realized that on another issue, but not sure which one.

esmerel’s picture

Status: Active » Needs review
FileSize
0 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,627 pass(es). View

I'm not comfortable committing code changes, so I'm going to make a patch :D

esmerel’s picture

FileSize
672 bytes
PASSED: [[SimpleTest]]: [MySQL] 1,627 pass(es). View

Let's try this with a real patch.

joelpittet’s picture

Issue summary: View changes
Status: Needs review » Reviewed & tested by the community

There looks to be another bug here where $field->field_alias is checked but not used in the concatenation... anyways this code is correct.

joelpittet’s picture

Status: Reviewed & tested by the community » Needs review
FileSize
673 bytes
673 bytes

@Lendude pointed out it's kind of silly that it's checking for an field_alias then using the real_field in the D8 version, so here's the patch to make that make a bit more sense. If there was a reason for the other way it should have been explained in a comment.