[Meta] Views integration with EFQ2

Created on 26 May 2013, about 11 years ago
Updated 7 March 2024, 4 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 about 17 hours 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 New Zealand

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