- Issue created by @joel_osc
I am upgrading a site to the latest D7 no the final fumes of a contract and have hit a snag. A view that works fine in views 3.20 stopped working in 3.29. I have recreated the issue with a super simple version of the view which just has fields: nid and an entityreference field (user) and aggregation on and that is all. The aggregation setting for the entityreference field is group results together on entity id. I also tried target id and all the other checkboxes which did not change the query at all.
In 3.20 the query is:
SELECT DISTINCT node.nid AS nid, node.language AS node_language, MIN(node.nid) AS nid_1, 'node' AS field_data_field_primary_contact_node_entity_type
FROM
{node} node
LEFT JOIN {field_data_field_primary_contact} field_data_field_primary_contact ON node.nid = field_data_field_primary_contact.entity_id AND (field_data_field_primary_contact.entity_type = 'node' AND field_data_field_primary_contact.deleted = '0')
GROUP BY node.nid, node.language, field_data_field_primary_contact_node_entity_type
LIMIT 50 OFFSET 0
Gives 3011 results.
In 3.29 the query is:
SELECT DISTINCT node.nid AS nid, node.language AS node_language, field_data_field_primary_contact.field_primary_contact_target_id AS field_data_field_primary_contact_field_primary_contact_targe, field_data_field_primary_contact.entity_id AS field_data_field_primary_contact_entity_id, MIN(node.nid) AS nid_1, 'node' AS field_data_field_primary_contact_node_entity_type
FROM
{node} node
LEFT JOIN {field_data_field_primary_contact} field_data_field_primary_contact ON node.nid = field_data_field_primary_contact.entity_id AND (field_data_field_primary_contact.entity_type = 'node' AND field_data_field_primary_contact.deleted = '0')
GROUP BY field_data_field_primary_contact_node_entity_type
LIMIT 50 OFFSET 0
Gives 1 result.
I would appreciate any ideas / guidance on where to look to debug this further. Kind thanks.
Active
3.29
aggregator data