Entity reference autocomplete lists entity labels only in current content language

Created on 26 November 2013, over 10 years ago
Updated 26 April 2024, 2 months 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

11.0 πŸ”₯

Component
EntityΒ  β†’

Last updated 1 day 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).

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

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