The argument $form_state in the function i18n_field_field_widget_form() should be passed by reference and not by value.

function i18n_field_field_widget_form($form, $form_state, $field, $instance, $langcode, $items, $delta, $element) {

should be

function i18n_field_field_widget_form($form, &$form_state, $field, $instance, $langcode, $items, $delta, $element) {

Passing by value discards all changes that the original 'module_field_widget_form()' (which i18n_field_field_widget_form() redirects through) makes to $form_state.

One direct impact is: #1156468: New translations don't inherit parent field collections (field_collection)

Patch follows

CommentFileSizeAuthor
#1 form_state-passed-by-value-1197866-1.patch819 bytesjox
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jox’s picture

Status: Active » Needs review
FileSize
819 bytes
Jerome F’s picture

subscribe

TommyChris’s picture

The patch worked, thanks!

Jose Reyero’s picture

Status: Needs review » Fixed

Fixed, thanks.

TommyChris’s picture

Status: Fixed » Reviewed & tested by the community
TommyChris’s picture

Status: Reviewed & tested by the community » Closed (fixed)