Error at Sort Criteria

Created on 9 September 2016, over 8 years ago
Updated 19 April 2023, over 1 year ago

I tried to create a view for similar terms, but when i select "Similar by terms: Similarity" for Sort Criteria i got the error:

SQLSTATE[42000]: Syntax error or access violation: 1140 Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause: SELECT node_field_data.nid AS nid, COUNT(node.nid) AS node_nid, RAND() AS random_field FROM {node_field_data} node_field_data LEFT JOIN {node__field_tags} node__field_tags_value_0 ON node_field_data.nid = node__field_tags_value_0.entity_id AND node__field_tags_value_0.field_tags_target_id = :views_join_condition_0 LEFT JOIN {node__field_tags} node__field_tags_value_1 ON node_field_data.nid = node__field_tags_value_1.entity_id AND node__field_tags_value_1.field_tags_target_id = :views_join_condition_1 LEFT JOIN {node__field_tags} node__field_tags_value_2 ON node_field_data.nid = node__field_tags_value_2.entity_id AND node__field_tags_value_2.field_tags_target_id = :views_join_condition_2 LEFT JOIN {node__field_tags} node__field_tags_value_3 ON node_field_data.nid = node__field_tags_value_3.entity_id AND node__field_tags_value_3.field_tags_target_id = :views_join_condition_3 INNER JOIN {node} node ON node_field_data.nid = node.nid WHERE (( (node_field_data.status = :db_condition_placeholder_4) AND (node_field_data.type IN (:db_condition_placeholder_5)) AND( (node__field_tags_value_0.field_tags_target_id = :db_condition_placeholder_6) OR (node__field_tags_value_1.field_tags_target_id = :db_condition_placeholder_7) OR (node__field_tags_value_2.field_tags_target_id = :db_condition_placeholder_8) OR (node__field_tags_value_3.field_tags_target_id = :db_condition_placeholder_9) ))) ORDER BY random_field ASC, node_nid ASC LIMIT 5 OFFSET 0; Array ( [:db_condition_placeholder_4] => 1 [:db_condition_placeholder_5] => article [:db_condition_placeholder_6] => 333 [:db_condition_placeholder_7] => 332 [:db_condition_placeholder_8] => 334 [:db_condition_placeholder_9] => 331 [:views_join_condition_0] => 333 [:views_join_condition_1] => 332 [:views_join_condition_2] => 334 [:views_join_condition_3] => 331 )

I can save the view, but when i place the block on the content type i got:

The website encountered an unexpected error. Please try again later.

πŸ› Bug report
Status

Closed: outdated

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡·Greece Liakoni

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024