If you create a node in french with a entity reference field (with autoload) and then you translate this new node into another language of your choice the language value into the url don't change.

So if you use the entity reference field, he will found nodes in relationship with the url language ans not with your new content language.

#4 Selection_028.png21.75 KBBabou
Members fund testing for the Drupal project. Drupal Association Learn more


Echofive’s picture

All fields "reference" type using the mode selection "simple" (in each field settings).
Another method is proposed ("Views" mode).
To use this mode, we need to create a view for each fields using "reference" type.
It's a little bit long and not yet tested... but for the moment this is the only way that we have...
We need to test...

bart.hanssens’s picture

Title: Entity refence load nodes with wrong language. » Entity reference load nodes with wrong language
bart.hanssens’s picture

Issue tags: +release1.0

added tag

Babou’s picture

Assigned: Echofive » bart.hanssens
Status: Active » Needs review
21.75 KB

I have implemented the solution proposed above.

There are two new view's displays, each content type with a reference to download or address will be using those displays to fill the autocomplete list.

It's not possible to send a language as a parameter to this view other than the one in the URL. Which means that it's not possible to filter on the language and therefore that we show every nodes matching your search.

For instance if you are looking for a download, we will list all the downloads in all the languages available on the site (the language of the referenced download is displayed on the list, see the screenshot attached)

You will have to run a drush cc all and then a drush fra -y for the changes to take effect.

Babou’s picture

Version: » 7.x-1.x-dev
Status: Needs review » Fixed

Please update the status.We are close to the final release so we need to know whether there are still some work to do here or not.


Automatically closed -- issue fixed for 2 weeks with no activity.

  • Commit 1fc059d on 7.x-1.x, 7.x-1.7 by Openfed:
    Issue #2033053: Entity reference load nodes with wrong language :
    - add...

  • Commit 1fc059d on 7.x-1.x, 7.x-1.8 by Openfed:
    Issue #2033053: Entity reference load nodes with wrong language :
    - add...