Hello,

I have a multilingual site, and I installed your module.
The module works like a charm on a vanilla install, but if you enable translation, with Field translation, things start to break.
I am adding a small module with a minor change, that should help people if you are facing the issue.

Update: I never stated what the problem is.
The problem is, the right side block which says "Selected Options:" is always empty and never contains any data.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

vaibhavjain’s picture

FileSize
833 bytes
vaibhavjain’s picture

Also, I see the code added in this issue -> https://www.drupal.org/node/1585484, also contain "LANGUAGE_NONE" which is a Multilingual killer.
Please use "$element['#language']" which will allow per element level language control.
However, I may be wrong, haven't tested it in all scenarios, but AFAIK, language in elements is added everytime, regardless of the node translation or field translations, or others.

So the new code looks like this

foreach ($form_state['values'][$bundle][$element['#language']] as $field) {
      $field_name = $element['#field_name'];
      if (isset($field[$field_name])) {
        foreach ($field[$field_name][$element['#language']] as $nid) {
          $items[] = array($value_key => $nid);
        }
      }
    }
vaibhavjain’s picture

Issue summary: View changes
rcodina’s picture

Status: Active » Needs review
rcodina’s picture

Priority: Normal » Major
Status: Needs review » Needs work

I have problems too in multilingual site. I have an Entity Reference field (referencing a taxonomy vocabulary) with multiple values. Multiselect is the choosed widget for it. If I edit an english node with taxonomy "Breakfast" selected, when I edit the node in spanish i don't see "Desayuno" selected (nothing is selected). Your patch doens't work for me.

I think this module needs more testing under international sites and entity reference fields.

As a workaround, use this module: Improved Multi Select

Also, check out this ER issue.

Jelle_S’s picture

Version: 7.x-1.10 » 7.x-1.x-dev
Status: Needs work » Needs review
FileSize
760 bytes

Patch no longer applied for me in the latest stable version so here's a reroll.