Fatal error when using "Event series start date" filter in views

Created on 16 July 2024, 4 months ago

I've added the "event series start date" as a field in a view.
However, when i do any kind of exposed view operation, I get the error below.

I'll attach a patch that fixes the issue in the query. Please review carefully, as I'm a bit confused if this is the right approach.

Drupal\Core\Database\IntegrityConstraintViolationException: SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'eventseries_start_date' in field list is ambiguous: SELECT "eventseries_field_data"."langcode" AS "eventseries_field_data_langcode", "eventseries_field_data"."id" AS "id", eventseries_start_date AS "eventseries_start_date" FROM "eventseries_field_data" "eventseries_field_data" LEFT JOIN (SELECT "eventinstance_field_data"."eventseries_id" AS "eventseries_id", MIN(eventinstance_field_data.date__value) AS "eventseries_start_date" FROM "eventinstance_field_data" "eventinstance_field_data" GROUP BY "eventinstance_field_data"."eventseries_id") "eventseries_start_date" ON eventseries_field_data.id = eventseries_start_date.eventseries_id LEFT JOIN "eventseries__field_categories" "eventseries__field_categories" ON eventseries_field_data.id = eventseries__field_categories.entity_id AND eventseries__field_categories.deleted = :views_join_condition_0 LEFT JOIN (SELECT "eventinstance_field_data"."eventseries_id" AS "eventseries_id", MIN(eventinstance_field_data.date__value) AS "eventseries_start_date" FROM "eventinstance_field_data" "eventinstance_field_data" GROUP BY "eventinstance_field_data"."eventseries_id") "eventseries_start_date_1" ON eventseries_field_data.id = eventseries_start_date_1.eventseries_id WHERE ((CONCAT_WS(' ', eventseries_field_data.id, ' ', eventseries_field_data.title) LIKE :views_combine)) AND ("eventseries__field_categories"."field_categories_target_id" IN (:db_condition_placeholder_1)) LIMIT 41 OFFSET 0; Array ( [:views_combine] => %a% [:db_condition_placeholder_1] => 11 [:views_join_condition_0] => 0 ) in Drupal\mysql\Driver\Database\mysql\ExceptionHandler->handleExecutionException() (line 45 of core/modules/mysql/src/Driver/Database/mysql/ExceptionHandler.php).

🐛 Bug report
Status

Needs review

Version

2.0

Component

Recurring Events (Main module)

Created by

🇩🇰Denmark ras-ben Copenhagen

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

Comments & Activities

Production build 0.71.5 2024