Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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!!
Comment | File | Size | Author |
---|---|---|---|
#8 | i18n_field_field_widget_form_alter-notice-undefined-build-info-2054587-9.patch | 593 bytes | marabak |
Comments
Comment #1
Jose Reyero CreditAttribution: Jose Reyero commentedThat'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..)
Comment #2
inst CreditAttribution: inst commentedHi 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
Comment #3
Jose Reyero CreditAttribution: Jose Reyero commentedThe 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
Comment #4
inst CreditAttribution: inst commentedThanks for feedback. -
Yes, I try to get my host to update the debian distribution.
Comment #5
oligodosh CreditAttribution: oligodosh commentedFYI, 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.
Comment #6
marabak CreditAttribution: marabak at Lumini commentedI 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.
Comment #7
marabak CreditAttribution: marabak at Lumini commentedi have added a patch with a simple isset() test
Comment #8
marabak CreditAttribution: marabak at Lumini commentedthis one is working
Comment #9
NWOM CreditAttribution: NWOM commentedI can confirm that this problem still exists in certain circumstances. The fix at #8 solved the issue for me as well.
Comment #10
NWOM CreditAttribution: NWOM commentedComment #11
crevillo CreditAttribution: crevillo as a volunteer commentedIssue happening in a drupal 7.43 site and with last i18n versions. Fix at #8 also worked for me.
Comment #12
fox_01 CreditAttribution: fox_01 commented#8 worked for me too
Comment #13
TD44 CreditAttribution: TD44 commentedAfter 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
Comment #14
Irbis CreditAttribution: Irbis commentedI 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
Comment #15
joseph.olstadThanks