Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
I have the following warnings when using FAPE, Panels IPE, and Organic Groups. (I'm integrating OG into Panopoly.)
The warnings occur when og_field_access($op, $field, ...) tries to access $field['field_name'] for $field= 'group_group'.
Warning: Illegal string offset 'field_name' in og_field_access() (line 592 of /sites/all/modules/og/og.module).
Warning: Illegal string offset 'field_name' in og_ui_field_access() (line 773 of /sites/all/modules/og/og_ui/og_ui.module).
Warning: Illegal string offset 'field_name' in og_field_access() (line 592 of /sites/all/modules/og/og.module).
Warning: Illegal string offset 'field_name' in og_ui_field_access() (line 773 of /sites/all/modules/og/og_ui/og_ui.module).
FAPE is passing $field_name instead of a full field structure array to field_access() [inside of fape_panels_pane_content_alter] which then cascades down to og_field_access().
Comment | File | Size | Author |
---|---|---|---|
#17 | fape-n1846156-17.patch | 3.19 KB | DamienMcKenna |
#5 | fape-1846156-5.patch | 3.07 KB | Pancho |
Comments
Comment #1
ericras CreditAttribution: ericras commentedComment #2
PanchoI can confirm the bug, and the patch #1 fixes it.
I just refactored the code a bit, so it is less redundant and more readable, so either of the two should be fine. But please do some testing!
Comment #3
PanchoSame bug in fape_field_edit_page(), leading to some more of the same warnings:
Enclosed patch should fix both bugs, but please do some thorough tests.
Comment #4
kclarkson CreditAttribution: kclarkson commentedI am confirming that the patch applied cleanly and has fixed the error message.
Comment #5
PanchoThe same patch, but a bit simplified. We don't really need the helper function I added in #2.
From what my tests say, it works fine.
Comment #6
Hydra CreditAttribution: Hydra commentedThis should proabably be updated to the newest version of Pancho's patch. Still needs review, works for me.
Comment #7
mpotter CreditAttribution: mpotter commentedUsing this (#5) in Open Atrium 2 without any problem.
Comment #8
das-peter CreditAttribution: das-peter commentedPatch from #5 looks good and I can confirm that it solves the problem.
Comment #9
saltednutWe're using #5 in Demo Framework. RTBC++
Comment #10
mrfelton CreditAttribution: mrfelton commentedNow using #5 in the Panopoly distribution too.
Comment #11
saltednutComment #12
saltednutI believe there may still be something going on here. I am seeing errors in the logs but not on every page. Can anyone confirm?Error appears to have been environmentally specific. Sorry about that.
Comment #13
saltednutComment #14
saltednutComment #15
drupalycious CreditAttribution: drupalycious commentedI confirm that patch#5 fixed the following errors:
Illegal string offset 'field_name' in og_ui_field_access() (line 823 of /.../sites/all/modules/og/og_ui/og_ui.module).
Illegal string offset 'field_name' in og_field_access() (line 588 of /.../sites/all/modules/og/og.module).
Will it be committed?
Comment #16
nlambert CreditAttribution: nlambert commented#5 works for me
Comment #17
DamienMcKennaThanks for the patch, I'm committing it after making a minuscule tweak or three.
Comment #18
DamienMcKennaComment #20
saltednutw000t!
Comment #21
DamienMcKennaComment #23
cmonnow CreditAttribution: cmonnow commentedJust some trivia...this bug only reared its head when I upgraded from PHP 5.3 to PHP 5.5.