[Meta] Views integration with EFQ2

Created on 26 May 2013, over 11 years ago
Updated 7 March 2024, 9 months ago

Follow up for #1498674: Refactor node properties to multilingual

Problem/Motivation

📌 Add contextual information about languages in queries Postponed: needs info adds language to queries sprinkled around in core. Should also be done for views.
Views are still using {node} as base table in properties to multilingual, which is not ideal for performance, since queries cannot use the field data indexes.

After this issue, views will use EFQ2 and the entity storage controller will automatically generate the most appropriate queries.

We need to consider that as soon as we start translating nodes, we will have a row for each translation in the result for every view sorting or joining on node fields

Proposed resolution

Make entity storage controller automatically generate the most appropriate queries.

It might be possible to solve this while working on a proper integration between Views and EFQ2.

If Views relies on EFQ2 to query entities then the entity storage controller can automatically generate the most appropriate queries, since EFQ2 already supports data tables.

It would probably make sense to have an implicit filter selecting only rows from the data table with default_langcode = 1, if no explicit language filter is defined.

Original report in issue summery of #1498674: Refactor node properties to multilingual

Views integration: views are still using {node} as base table, which is not ideal for performance, since queries cannot use the field data indexes. It should be possible to solve this while working on a proper integration between Views and EFQ2. If Views relies on EFQ2 to query entities then the entity storage controller can automatically generate the most appropriate queries, since EFQ2 already supports data tables.
Aside from the perfomance issues, we need to consider that as soon as we start translating nodes, we will have a row for each translation in the result for every view sorting or joining on node fields. It would probably make sense to have an implicit filter selecting only rows from the data table with default_langcode = 1, if no explicit language filter is defined. Again this would be taken care of by EFQ2 if we get proper integration with Views.

📌 Task
Status

Postponed: needs info

Version

11.0 🔥

Component
Node system 

Last updated 6 days ago

No maintainer
Created by

🇦🇺Australia harry99

Live updates comments and jobs are added and updated live.
  • D8MI

    (Drupal 8 Multilingual Initiative) is the tag used by the multilingual initiative to mark core issues (and some contributed module issues). For versions other than Drupal 8, use the i18n (Internationalization) tag on issues which involve or affect multilingual / multinational support. That is preferred over Translation.

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.

  • 🇳🇿New Zealand quietone

    Is this still relevant to a supported version of Drupal?

    Since we need more information to move forward with this issue, I am setting the status to Postponed (maintainer needs more info). If we don't receive additional information to help with the issue, it may be closed after three months.

    Thanks!

Production build 0.71.5 2024