Problem/Motivation
I tried to get the file URI of the user picture so I created a user based view and tried to add a relationship to User: Picture
. Sadly I got following error directly after adding the relationship:
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'file_managed_user__user_picture.target_id' in 'on clause': SELECT COUNT(*) AS expression FROM (SELECT 1 AS expression FROM {users} users INNER JOIN {users_field_data} users_field_data ON users.uid = users_field_data.uid LEFT JOIN {user__user_picture} user__user_picture ON users_field_data.uid = user__user_picture.entity_id AND (user__user_picture.deleted = :views_join_condition_0 AND user__user_picture.langcode = users_field_data.langcode) LEFT JOIN {file_managed} file_managed_user__user_picture ON user__user_picture.user_picture_target_id = file_managed_user__user_picture.target_id WHERE (( (users_field_data.status <> :db_condition_placeholder_0) ))) subquery; Array ( [:db_condition_placeholder_0] => 0 [:views_join_condition_0] => 0 )
Beta phase evaluation
Issue category | Bug |
---|---|
Prioritized changes | The main goal of this issue is a bug fix. |
Disruption | None |
Comment | File | Size | Author |
---|---|---|---|
#27 | 2417625-27-complete.patch | 11.77 KB | geertvd |
#27 | 2417625-27-tests.patch | 10.63 KB | geertvd |
#27 | interdiff.txt | 1.27 KB | geertvd |
#6 | 2417625-6.complete.patch | 11.97 KB | geertvd |
#6 | 2417625-6.tests_.patch | 10.82 KB | geertvd |
Comments
Comment #1
geertvd CreditAttribution: geertvd commentedWas able reproduce this.
Patch fixed the issue for me.
Comment #2
geertvd CreditAttribution: geertvd commentedComment #3
yannickooOh yeah your patch made it!
Comment #4
dawehnerThank you for creating a patch!
Did someone considered writing a test?
Comment #5
geertvd CreditAttribution: geertvd commentedI'll write up a test for this.
Comment #6
geertvd CreditAttribution: geertvd commentedAdded a test for image and file.
Comment #15
geertvd CreditAttribution: geertvd commentedTest failing because #2394883: Language setup for entity and field based rendering in views is independent, confusing UI, lacking test coverage
Comment #18
geertvd CreditAttribution: geertvd commentedComment #19
geertvd CreditAttribution: geertvd commentedComment #23
geertvd CreditAttribution: geertvd commentedSomething went wrong when I created that last patch.
Comment #26
Lendudenitpicking:
Should be \Drupal\file\Tests....
double newline
double newline
fix looks good, nice tests.
Added beta evaluation.
Comment #27
geertvd CreditAttribution: geertvd commentedFixed those small formatting issues.
Thanks for adding the beta evaluation.
Comment #29
LendudeLooks good to me.
Comment #30
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 4210a02 and pushed to 8.0.x. Thanks!