Hello,

I found out that the new release (i18n 7.x-1.8) broke the field translation.
The implementation of hook_field_widget_form_alter() seems wrong. It doesn't work when the field is not mandatory and keys are based on text (not numbers).

Here is the bug i18n_field introduce : http://kiliweb.fr/images/problem_i18n_field.png

I attach a patch to correct this issue.
Any feedback would be appreciate.

Comments

Status: Needs review » Needs work

The last submitted patch, i18n_field.patch, failed testing.

kiliweb’s picture

StatusFileSize
new1.02 KB

Let's try with this one.

kiliweb’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, i18n_field_2.patch, failed testing.

kiliweb’s picture

StatusFileSize
new1.03 KB
kiliweb’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, i18n_field_3.patch, failed testing.

kiliweb’s picture

Does anyone know why the test fail ?

kiliweb’s picture

flo_at’s picture

I am by no means a coder but it seems that you tried to patch a file that was not there :(

[08:25:26] Command [git apply --check -p1 /var/lib/drupaltestbot/sites/default/files/review/i18n_field_3.patch 2>&1] failed
Duration 0 seconds
Directory [/var/lib/drupaltestbot/sites/default/files/checkout/sites/default/modules/i18n]
Status [1]
Output: [error: sites/default/modules/i18n/i18n_field/i18n_field.module: No such file or directory].
[08:25:26] Encountered error on [apply], details:

bojanz’s picture

Status: Needs work » Postponed (maintainer needs more info)

It looks like you're providing a reverse patch (it's backwards), which is why it doesn't apply.

Still, I was unable to reproduce your bug. $element['#options'] should always be an array.
Can you please provide the exact instructions to recreate this (add field of type X, enter Y in the allowed values, etc).

jose reyero’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

No follow up, so closing.