Entity reference autocomplete lists entity labels only in current content language

Created on 26 November 2013, about 11 years ago
Updated 30 January 2023, almost 2 years ago

Problem/Motivation

On a multi language site the list of autocompleted nodes always show up in the current content language. Editing a Chinese site with admin UI language set to German, the list of nodes should be returned in the language they were matched.

Proposed resolution

The autocomplete callback needs to consider the language.

Steps to reproduce

  1. install drupal 8
  2. enabling content translation module
  3. adding language
  4. enable translation for articles (admin/config/regional/content-language)
  5. add an entity reference field to the article content type
  6. create an article
  7. translate article
  8. create a second article, with the langcode in the url (for example: af/node/add/article)
  9. type something in the autocomplete entity reference field
  10. save the second article
  11. translate the second article
  12. check whether the entity reference field of the second article has correct title in all the languages
  13. check the above on each of the corresponding edit pages too

Remaining tasks

Rewrite the entity query of DefaultSelection.

User interface changes

Language of node titles in entity reference field match the user input instead of current content language.

API changes

None

🐛 Bug report
Status

Needs work

Version

10.1

Component
Entity 

Last updated about 13 hours ago

Created by

🇩🇪Germany ti2m

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.

  • Triaged core major

    There is consensus among core maintainers that this is a major issue. Only core committers should add this tag.

  • Needs product manager review

    It is used to alert the product manager core committer(s) that an issue represents a significant new feature, UI change, or change to the "user experience" of Drupal, and their signoff is needed. If an issue significantly affects the usability of Drupal, use Needs usability review instead (see the governance policy draft for more information).

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