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.
Navigated to this page on a brand new install:
admin/structure/spaces/list/og_controlled/edit
And saw this:
Notice: Undefined variable: group_form in _spaces_og_form_spaces_preset_editor_alter() (line 235 of modules/all/spaces/spaces_og/spaces_og.pages.inc).
Warning: array_intersect_key(): Argument #1 is not an array in _spaces_og_form_spaces_preset_editor_alter() (line 235 of modules/all/spaces/spaces_og/spaces_og.pages.inc).
Comment | File | Size | Author |
---|---|---|---|
#3 | spaces-og_preset_alter-1666692-3.patch | 772 bytes | jeffschuler |
#1 | spaces_og-group_form_undefined-1666692-2.patch | 675 bytes | jasonawant |
Comments
Comment #1
jasonawantHello,
This is still present in 7.x-3.x-dev.
From what I can tell from my limited experience $group_form needs to be defined as array before using it in array_intersect_key.
I add the following to spaces_og.pages.inc
I've just started working with spaces 3.x and spaces_og, so I'm not any where near up to speed on what's going here.
Jason.
Comment #2
jeffschulerThis removes the warning, but there's no point in doing an array_intersect_key() with an empty array as the first parameter.
A couple lines up from there, the setting of
$group_form
is commented-out.Looks like this was done in this commit by @webflo, but is undocumented, (his commit message just says "fix stash".)
Comment #3
jeffschulerWell, the lines with
og_group_form()
andog_access_alter_group_form()
are commented-out because those functions no longer exist, but I'm not familiar enough with this yet to know what we should be doing instead.The attached patch really does nothing different than that in #1, but applies the patch from the correct directory, fixes whitespace, and adds a @TODO comment.
Comment #4
zikaelismik CreditAttribution: zikaelismik commentedHi, i'm trying to make spaces 7.3.x to work with organic groups and i'm facing a problem i suppose it is related to this issue. Each time i try to edit a group preset i get these undefinex index messages
I guess since there is this comment:
this problem has not been addressed yet.
Obviously the Og Settings panel in the preset edit is empty.
I tried to apply the patch #3 but still get these errors and still can't use the module.
Another thing i'm seeing is that og_access.js is missing from the og_access module. I mean that there isn't a js in the og package. Don't know if it used to be there and they removed it but i guess this line
drupal_add_js(drupal_get_path('module', 'og_access') . '/og_access.js');
is no longer needed?
Thanks for any help
M