Hi,

Steps:
1. Install Field Collection module from http://drupal.org/project/field_collection;
2. Create a field collection in a Content type. And add a field by 'Term reference' using Multiselect widget.
3. Add or edit that 'Content type'.
4. After saving, the 'Multiselect' right column will not show the saved options, only display empty.

My suggest:
Seems that html attribute 'id' are not defined according to 'Field Collection'. Some 'id's are duplicate. So I re-define $element['#field_name'].
So I insert
$element['#field_name'] = drupal_html_id('edit-' . implode('-', $element['#field_parents']));
in line 204 of multiselect.module. It seems solve the problem.

Comments

nguyentom715’s picture

Version: 7.x-1.9 » 6.x-1.x-dev
Assigned: Unassigned » nguyentom715

I have the same problem. I could select the item but when I clicked submit, it will show the empty box in selected options. How to fix the drupal 6?

paolomainardi’s picture

Status: Active » Needs review
StatusFileSize
new474 bytes

Attached a patch as suggested by #1.

xenophyle’s picture

Version: 6.x-1.x-dev » 7.x-1.9
Issue summary: View changes

The patch in #2 works for me.

knowledges33ker’s picture

The patch in #2 did not work for me. I was able to apply the patch but once applied the items on both sides of the select list are duplicated and there's no way to move items back and forth.

attheshow’s picture

Status: Needs review » Fixed

Just pushed a fix for this into the dev version.

  • b2d7aed committed on 7.x-1.x
    #1585484: Fix for display errors when used inside of a Field Collection
    

Status: Fixed » Closed (fixed)

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

tamarpe’s picture

I have this issue back on version 7.x-1.13 , when i'm applying the patch i have the same problem as above,
the items on both sides of the select list are duplicated and there's no way to move items back and forth.

Someone knows how to solve it ? The problem is the duplicated id's , i have ' Found 2 elements with non-unique id ' as an error

tamarpe’s picture

StatusFileSize
new607 bytes

Solved my issue with showing only selected items