- Issue created by @Bruno2
Wrong column uid1 when I use representative nodes twice in a view.
Drupal\Core\Database\DatabaseExceptionWrapper: Exception in test_attachment[test_attachment]: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users_field_data.uid1' in 'where clause': SELECT DISTINCT "users_field_data"."langcode" AS "users_field_data_langcode", "users_field_data"."uid" AS "uid", "node_field_data_users_field_data"."langcode" AS "node_field_data_users_field_data_langcode", "node_field_data_users_field_data"."nid" AS "node_field_data_users_field_data_nid" FROM "users_field_data" "users_field_data" INNER JOIN "node_field_data" "node_field_data_users_field_data" ON (SELECT "node_field_dataINNER"."nid" AS "nidINNER" FROM "node_field_data" "node_field_dataINNER" LEFT JOIN "users_field_data" "users_field_data_node_field_dataINNER" ON "node_field_dataINNER".uid = "users_field_data_node_field_dataINNER".uid WHERE ("users_field_data_node_field_dataINNER".uid = users_field_data.uid1) ORDER BY "node_field_dataINNER"."created" DESC LIMIT 1 OFFSET 0) = node_field_data_users_field_data.nid WHERE ("users_field_data"."status" = :db_condition_placeholder_0) AND ("node_field_data_users_field_data"."status" = :db_condition_placeholder_1) LIMIT 10 OFFSET 0; Array ( [:db_condition_placeholder_0] => 1 [:db_condition_placeholder_1] => 1 ) in main() (line 19 of index.php).
Create a views page with user and a attachment, both with representative Nodes. The view works after save the relationsship, after clearing the cache the SQL error appears.
Drupal 10.1
Active
10.1 β¨
Last updated
Related to the Views in Drupal Core initiative.