With the field collection module for example, if using nested field collection, one will get a crash trying to save the translation if the parent field collection for the source entity has more than one item. This is caused by field collection calling field_widget_field in form validation, and since the $form_state (including field state) of the translation corresponds to an empty entity form (with the one default item), the information is missing. What needs to be done is to convert the field state (at least the 'fields' field state), from the source form, and inject it into the current form state as outlined in this patch. It's not a perfect fix (if you happen to have a field name with the same name as a language prefix, you are in trouble), but it should be safe enough. Other suggestions are welcome, but this solution/workaround is at least pretty compact.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | entity_translation-field-state-2715091-2.patch | 1.34 KB | gnucifer |
Comments
Comment #2
gnucifer commentedComment #3
gnucifer commentedComment #4
gnucifer commentedComment #5
gnucifer commentedComment #6
gnucifer commentedComment #7
gnucifer commentedOh, just realized this is probably a duplicate of https://www.drupal.org/node/2339315.
Comment #8
gnucifer commented