Hi,
I enabled i18n and gave my node type the possibility to be translated.
But every time, when I open a node I get this error:

Notice: Undefined index: form_id in i18n_field_field_widget_form_alter()

can anybody give me a hint, what´s wrong?

thanks!!

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Jose Reyero’s picture

Priority: Critical » Minor
Status: Active » Postponed (maintainer needs more info)

That's not an error, but a 'notice', just disable them for your live site.
No idea why, are you using latest stable versions from everything else? (Drupal core, etc..)

inst’s picture

Hi Jose,
ahh, thanks - that is good to hear.
Yes, for the modulesI´ve the latest version but not for the core.
I am on 7.14 as my site ist hosted on a debian drupal. And there is still no newer version.

best,
fränk

Jose Reyero’s picture

Title: Error from i18n » Error from i18n : Notice: Undefined index: form_id in i18n_field_field_widget_form_alter()
Component: Node » Fields
Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

The module is suppossed to work with latest Drupal core version, and we cannot test with older versions / combinations.

Anyway, just disable notices for now till you can upgrade. Or try the last i18n version released before Drupal 7.15

Check out:
https://drupal.org/node/3060/release?api_version[]=103
https://drupal.org/node/5917/release?api_version[]=103

inst’s picture

Thanks for feedback. -
Yes, I try to get my host to update the debian distribution.

oligodosh’s picture

FYI, the full text of the notice is:

"Notice : Undefined index: form_id in i18n_field_field_widget_form_alter() 
(line 179 in ...\modules\i18n\i18n_field\i18n_field.module)"

- The initial i18n installation was made on a Drupal 7.12 config with the version 7.x-1.8+2-dev,
- I came across the field translation issue : Labels are not translated with i18n_field for Drupal core,
- So I upgraded i18n to the 7.x-1.9+6-dev version and the notice popped up.
- There is one notice per each field that was not translated correctly with the original i18n version,
- I tried to upgrade the Variable module as well to the version 7.x-2.3 but it changed nothing,
- Same symptoms with the i18n stable version 7.x-1.10.

Thanks a lot for your much appreciated work, Jose.

marabak’s picture

Issue summary: View changes

I have the same error. i don't know why but in some case i dont have 'build_info' key defined in the form_state array.
The i18n_field_field_widget_form_alter() function is checking the form_id without checking if the ket $form_state['build_info']['form_id'] is defined and that causes the notice.

marabak’s picture

i have added a patch with a simple isset() test

marabak’s picture

NWOM’s picture

Version: 7.x-1.9 » 7.x-1.x-dev
Category: Support request » Bug report
Status: Closed (cannot reproduce) » Needs work

I can confirm that this problem still exists in certain circumstances. The fix at #8 solved the issue for me as well.

NWOM’s picture

Status: Needs work » Needs review
crevillo’s picture

Issue happening in a drupal 7.43 site and with last i18n versions. Fix at #8 also worked for me.

fox_01’s picture

#8 worked for me too

TD44’s picture

After the i18n 7x-1.18 release i don't need the patch anymore.
https://www.drupal.org/project/i18n/releases/7.x-1.18

Does this patch solved this issue?
https://www.drupal.org/node/2386515

Irbis’s picture

I can confirm that this problem still exists in certain circumstances. The fix at #8 solved the issue for me as well.

My Environment:

Drupal: 7.78
i18n: 7.x-1.27
Database 4 byte UTF-8 support: Enabled
PHP: 7.4.16
Web-server: Apache/2.4.46 (Ubuntu)
DBMS version: 8.0.23

joseph.olstad’s picture

Status: Needs review » Fixed

Thanks

  • joseph.olstad committed b064349 on 7.x-1.x authored by marabak
    Issue #2054587 by marabak: Error from i18n : Notice: Undefined index:...

Status: Fixed » Closed (fixed)

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