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 there,
How to reproduce:
- fresh install of drupal 7.15 (minimal install)
- fresh install of OG-7.x-2.0beta2
- as admin, create content type 'gp' which is an og group.
- as admin, create content type 'gp_content' which is an og group content.
- as admin, create 2 nodes of type 'gp'
- as admin, create 2 nodes of type 'gp_content'
- as admin, edit your account => no issues
- install module i18n_fields
- as admin, edit your account => Fatal Error
The error:
Fatal error: Unsupported operand types in drupal/modules/field/modules/options/options.module on line 99
Comment | File | Size | Author |
---|---|---|---|
#20 | Edit user page - current language EN.jpg | 77.18 KB | MXT |
#20 | Edit user page - current language IT.jpg | 123.66 KB | MXT |
#4 | 17887480og-i18n-4.patch | 1.28 KB | amitaibu |
Comments
Comment #1
Norberto Ostallo CreditAttribution: Norberto Ostallo commentedI get the same error using og+i18n modules.
Comment #2
amitaibuI don't think it's OG's error -- why does i18n_field_field_widget_form() try to translate a non-translatable field?
Comment #3
mojiro CreditAttribution: mojiro commentedIt happens also to me after the latest update of organic groups.
I use i18n too.
Comment #4
amitaibuI've committed a small fix to OG, and it should be fixed with this patch.
Comment #5
Norberto Ostallo CreditAttribution: Norberto Ostallo commentedPatch in #4 solved the problem (it applies to i18n, not OG as stated).
Comment #6
carajito CreditAttribution: carajito commentedThe patch #4 solved the problem for me too and like Norberto Ostallo said applie the patch on i18n
Comment #7
Arnion CreditAttribution: Arnion commentedPatch in #4 solved this problem in node_form
Notice: Undefined index: #required in options_field_widget_form() (line 79 of /modules/field/modules/options/options.module).
Notice: Undefined index: #entity_type in options_field_widget_form() (line 83 of /modules/field/modules/options/options.module).
Notice: Undefined index: #entity in options_field_widget_form() (line 84 of /modules/field/modules/options/options.module).
but I have other problem. When I change language, the field Groups audience disappears.
This is because, the module Translate Field translates field instance using bundle and field name.
Comment #8
muschpusch CreditAttribution: muschpusch commentedThis also fixes a problem (#1) regarding OG and commerce kickstart
Comment #9
weri CreditAttribution: weri commentedThe patch #4 fixes the mentioned php error.
Comment #10
BenK CreditAttribution: BenK commentedAny chance of this patch getting committed soon?
Comment #11
slowflyer CreditAttribution: slowflyer commented@slayer: Install the patch from #4 and change:
to
Comment #12
Arnion CreditAttribution: Arnion commentedThanks @slowflyer,
But i solved the problem this way:
I Don't Know If It's right
Comment #13
Arlina CreditAttribution: Arlina commentedPatch in #4 solved the undefined index: #required, #entity_type, #entity in options_field_widget_form() error that appeared in the user/register and admin/people pages. Thanks!
Comment #14
MXTI can confirm that patch in #4 resolves the issue, but causes what already mentioned in #7:
Comment #15
Jose Reyero CreditAttribution: Jose Reyero commentedNot sure about the status of this one. According to #14, #7 this seems to be creating some other issues?
Could someone give it a try with latest og and post and update here?
Comment #16
MXTThere are other threads pointing here:
And reading http://drupal.org/node/1836062#comment-6792740 seems that patches #4 + #11 here solves the problem.
I think we need a cumulative patch here and supposedly an opinion by Amitabu.
Comment #17
Jose Reyero CreditAttribution: Jose Reyero commentedI think what we need to do is to implement some cleaner field translation.
Please give a try to this patch, which should fix all these issues (and some others)
#1875282: Improve field translation by implementing hook_field_widget_form_alter()
Marking as critical for next release.
Comment #18
MXTYES! patch suggested in #17 resolves ALL the issues in my case.
Thank you very much Jose!
Comment #19
MXTOoops just tested before test results: actually, switching language to IT, a minor issue with label translation is still present: labels for the second select "Other groups" are not translated and identical to the first select.
Comment #20
MXTOk I've tested last patch in http://drupal.org/node/1875282#comment-6882750
Results:
Comment #21
Jose Reyero CreditAttribution: Jose Reyero commentedCommitted the patch in #17 so the main issue here (fatal error) should be fixed now in dev version (once it gets repackaged).
We still have the issue explained in #20 though, so letting this one open, but updating title and priority.
Comment #22
Jose Reyero CreditAttribution: Jose Reyero commentedChanging into a question:
We still have the issue explained in #20?
Comment #23
Jose Reyero CreditAttribution: Jose Reyero commentedIt seems not (no follow up) so closing.
Comment #24
Jamesap CreditAttribution: Jamesap commentedThe issue with organic groups reference field cardinality 1, as shown in the images is still there.
Drupal 7.41
Organic Groups 7.x-2.7
I18n 7.x-1.13
BR