group_id_depth - Invalid parameter number: number of bound variables does not match number of tokens

Created on 4 September 2020, almost 4 years ago
Updated 29 December 2023, 6 months ago

When we use Has parent group ID (with depth) and uncheck "Subgroup 1 level" it will cause an SQL error

Drupal\Core\Database\DatabaseExceptionWrapper: Exception in Group posts[fut_group_posts]: SQLSTATE[HY093]: Invalid parameter number: number of bound variables does not match number of tokens: SELECT node_field_data.created AS node_field_data_created, node_field_data.nid AS nid, node_field_data.langcode AS node_field_data_langcode, MIN(node_field_data.nid) AS nid_1, MIN(group_content_field_data_node_field_data.id) AS group_content_field_data_node_field_data_id FROM {node_field_data} node_field_data INNER JOIN {group_content_field_data} group_content_field_data_node_field_data ON node_field_data.nid = group_content_field_data_node_field_data.entity_id AND group_content_field_data_node_field_data.type IN ( :views_join_condition_0__0, :views_join_condition_0__1, :views_join_condition_0__2, :views_join_condition_0__3 ) LEFT JOIN {group_graph} group_graph ON group_content_field_data_node_field_data.gid = group_graph.end_vertex WHERE (((group_graph.start_vertex = :gid AND group_graph.hops = :hops_-1)) OR ((group_content_field_data_node_field_data.gid = :gid))) AND ((node_field_data.status = :db_condition_placeholder_1) AND (node_field_data.type IN (:db_condition_placeholder_2))) GROUP BY node_field_data_created, node_field_data.nid, node_field_data_langcode ORDER BY node_field_data_created DESC LIMIT 5 OFFSET 0; Array ( [:gid] => 10 [:hops_-1] => -1 [:db_condition_placeholder_1] => 1 [:db_condition_placeholder_2] => fut_post [:views_join_condition_0__0] => fut_open-group_node-fut_event [:views_join_condition_0__1] => fut_open-group_node-fut_page [:views_join_condition_0__2] => fut_open-group_node-fut_post [:views_join_condition_0__3] => fut_open-group_node-fut_webform ) in Drupal\views\Plugin\views\query\Sql->execute() (line 1543 of core/modules/views/src/Plugin/views/query/Sql.php).

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium LOBsTerr

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.69.0 2024