I’m getting the following when trying to change the visibility of the weight field provided by the Weight module
Fatal error: Cannot use string offset as an array in … sites\all\modules\i18n\i18n_field\i18n_field.inc on line 148
and
Notice: Uninitialized string offset: 0 in i18n_field_instance->build_properties() (line 148 of … sites\all\modules\i18n\i18n_field\i18n_field.inc).
This is a dual language (English-Hungarian) Drupal 7 site with Hungarian as the primary language. The errors appear regardless of which language the change is attempted in. Not sure what other information to provide, but will do my best if asked. The bottom line is the weight field cannot be hidden in the node display as a result.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | uninitialized_string_offset-1493126-4.patch | 975 bytes | jvns |
Comments
Comment #1
grabby commentedFor what it’s worth, I’m also getting the error when I make any changes to the fields for a content type, such as hiding them, changing their widget, etc. This is especially a problem now when I have to add fields. It simply can’t be done!
Comment #2
grabby commentedFurther information on this problem is that the weight module had nothing to do with it – removing it had no effect – but that unchecking “Field translation” made the errors go away.
Comment #3
smhaller commentedHi,
I just got the same issue here when trying to add a new group to one of my views.
regards,
Stefan
Comment #4
jvns commentedI've been encountering this problem after upgrading from D6 to D7 (see also http://drupal.org/node/1431104, http://drupal.org/node/1431104).
Here's a 1-line patch that is fixing it for me. ($object['default_value'] is sometimes set but null)
Comment #6
mvcsame problem; this patch works for me.
the test seems very safe. i find it hard to believe that this patch is breaking the test suite.
Comment #7
jose reyero commentedReplaced both conditions with !empty() and committed. Thanks.
Atm the module tests are broken for a different reason, #1568862: Updates for Variable Realm API improvements (testbot using wrong variable version)
Comment #9
colanActual commit is d709eee.