Columns not found errors in multilingual site because of missing language suffix in query

Created on 8 October 2015, over 8 years ago
Updated 25 April 2024, about 2 months ago

I have a multilingual civicrm installation and have a few issues with extra contrib modules because the column is not found due to the language suffic missing.

  • With entity_reference module this error appears when you try to sort the widget on the title of the event
  • With entityqueue module this error appears when you try to add civicrm events to a civicrm event entityqueue

Example for entityqueue:
PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'civicrm_event.title' in 'where clause': SELECT civicrm_event.id AS entity_id, :entity_type AS entity_type, NULL AS revision_id, :bundle AS bundle FROM {civicrm_event} civicrm_event WHERE (civicrm_event.title LIKE :db_condition_placeholder_0 ESCAPE '\\') LIMIT 10 OFFSET 0; Array ( [:db_condition_placeholder_0] => %d% [:entity_type] => civicrm_event [:bundle] => civicrm_event ) in EntityFieldQuery->execute() (line 1192 of /includes/entity.inc).

This is because it should be title_en_US and title_fr_FR.

I think there is a query_alter needed to add the language suffix in a multilingual installation, similar to the example on https://forum.civicrm.org/index.php?topic=24741.0.

✨ Feature request
Status

Closed: won't fix

Version

2.0

Component

Code

Created by

πŸ‡§πŸ‡ͺBelgium hansrossel

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