If the controlling field is set to use a select widget, and is multi-valued, and the entity form also have a file field on it, then selecting multiple values in the controlling field leads to an error in the AJAX response:

> An illegal choice has been detected. Please contact the site administrator.
Notice: Undefined index: 145,146 in taxonomy_field_validate() (line 1522 of modules/taxonomy/taxonomy.module).

I've chased this as far up as entity_form_field_validate(). The pseudo entity formed here is getting an incorrect value for one of the field $items for the controlling field -- both terms are joined with a comma.

No idea how the presence of the filefield could be causing this!

Comments

flocondetoile’s picture

Hi,

I don't find (yet) the reason and so a solution. But there is a bypass to this issue. Instead of using a multiselect list, you can use checkboxes and it works fine then.

happysnowmantech’s picture

I encountered a very similar issue and the patch at https://www.drupal.org/node/1045208#comment-10326853 resolved it for me.

happysnowmantech’s picture