Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 314030

Entity reference always searches node titles in default language only

$
0
0

Problem/Motivation

On a multi language site the list of autocompleted nodes always show up in the default language. Editing a Chinese site with admin UI language set to German, the list of nodes should be (as discussed with Gábor) returned in the UI language.

Proposed resolution

The autocomplete callback needs to consider the language settings.

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

Review
Get to work without the if module exists content translation (See #83)
Eventually the languageManager needs to be pulled in through dependency injection.

User interface changes

Language of node titles in entity reference field match admin UI language instead of default site language.

API changes

None


Viewing all articles
Browse latest Browse all 314030

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>