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,
Just started to use OG and its possibilities on Drupal 6.
When i try to add new forum topic to OG Forum I will get this kind of error:
* warning: array_keys() [function.array-keys]: The first argument should be an array in /var/www/clients/www.mysite.ee/modules/og_forum/og_forum.module on line 439.
* warning: in_array() [function.in-array]: Wrong datatype for second argument in /var/www/clients/www.mysite.ee/modules/og_forum/og_forum.module on line 439.
Is there a reasonable explanation for this?
Comment | File | Size | Author |
---|---|---|---|
#2 | og_forum-694690.patch | 899 bytes | monotaga |
Comments
Comment #1
Uncle Nug CreditAttribution: Uncle Nug commentedI have the same issue :(
Comment #2
monotaga CreditAttribution: monotaga commentedThere appears to be a problem with the array_keys($user->og_groups) on line 439. I don't know the ins and outs of OG (or this module, for that matter), but my patch below seems to remove that error message.
Comment #3
h2rra CreditAttribution: h2rra commentedThanks! Seems to work properly now:)
Comment #4
dayre CreditAttribution: dayre commentedWas getting this too.
Looks like that $user->og_groups is NULL first time around through this function...but not on subsequent calls. That patch removes the warnings.
Comment #5
Anonymous (not verified) CreditAttribution: Anonymous commentedWould someone provide clear steps to reproduce this problem ?
Best,
Paul Booker
Comment #6
sadist CreditAttribution: sadist commentedI am also having this same problem, but only on my production server which is runing on UNIX (CentOS). Locally on my Windows Vista with WAMPSERVER, I don't have this issue at all.
The patch works for me!
Comment #7
AntiNSA CreditAttribution: AntiNSA commentedI am also having the same issue... will try the patch...
Comment #8
AntiNSA CreditAttribution: AntiNSA commentedAfter Applying this patch to the newest dev version you are no longer able to select forum to post in. This is flawed I need a sloution.
Comment #9
djhspence CreditAttribution: djhspence commentedsubscribe
Comment #10
ginc CreditAttribution: ginc commented+1
Comment #11
poprocks CreditAttribution: poprocks commentedMy initial installation of OG Forum was flawless. Then I messed up on the installation of other OG modules. Now, I'm getting this same error. Hope someone comes up with a solution soon. I'm going to try reinstalling OG and OG Forum from scratch.
Comment #12
dadderley CreditAttribution: dadderley commentedHappening for me too on a production server.
Comment #13
Ole Martin CreditAttribution: Ole Martin commentedFor me it was Organic groups user roles 6.x-4.1 that created this problem. Deactivated the module and then everything was fine again. But I would like to use this module so I wil try to find the error later. Since my site is in production so I wil make me a Sandbox later.
Comment #14
dadderley CreditAttribution: dadderley commentedI am using Organic groups user roles 6.x-4.1 as well.
Comment #15
ginc CreditAttribution: ginc commentedWe are using Organic groups user roles 6.x-4.1 as well. we need its functionality.
Comment #16
AntiNSA CreditAttribution: AntiNSA commentedme too
Comment #17
Ole Martin CreditAttribution: Ole Martin commentedI will try out a sandbox in this week-end and if I find something .. I need it also
Comment #18
Anonymous (not verified) CreditAttribution: Anonymous commentedIf you would like me to take a look at any variation of this problem would you submit your bug report in the following format :
User-Agent:
Build Identifier:
Description:
..
Reproducible: Always | Sometimes
Other OG / Forum related modules installed
..
Steps to reproduce:
1.
2.
..
Expected Results:
..
Actual Results:
..
Proposed solution:
..
Patch
Best,
Paul Booker
Appcoast
Comment #19
pumpkinkid CreditAttribution: pumpkinkid commentedHmm, the patch on #2 worked for me, and I am still able to select which forum to post in unlike on #8
Comment #20
KaaRoy CreditAttribution: KaaRoy commentedSame issue here. Subscribing.
Comment #21
KaaRoy CreditAttribution: KaaRoy commentedSomething that may help: I got this after playing with the group forums: I first created the forums for existing groups with the provided pushbutton. Then I deleted them because I did not specify a container. Then I specified a container, and created the forums again.
Comment #22
Anonymous (not verified) CreditAttribution: Anonymous commentedComment #23
Ivanhoe123 CreditAttribution: Ivanhoe123 commentedThank you, I had the same issue and OG user roles were causing it
Comment #24
robatk CreditAttribution: robatk commentedI've just encountered the problem for the second time using d6.17, og 2.1, og forum 2.2, and og user roles 4.1. I haven't installed advanced forums yet. Have you guys settled on a patch or is there some other solution in the works? I've been reading the documentation on og user_roles. It gets to be way too confusing because most of it is historical dialogue that has nothing to do with the world we are in now. I'm mentioning this because I'm soliciting opinions on the above configuration, but also using TAC in addition. Are these modules going to fit together and work? There isn't any recent documentation on how to bring this all together that I can find, and I've looked at our forum and the web, so I'm giving serious consideration to the following advice in http://drupal.org/node/200631 and dump OG all together. My gut feeling is that the access situation is too convoluted and poorly documented, which leaves a guy like me trying to guess at a reasonable solution. I would really appreciate some well informed opinions and recently documented "how to's" if any such thing exist. I've done a lot of reading and my stomach is turning into a knot. I am looking to build a site-wide forum, but also having multiple departments , each with their own content and forums. A sort of mini-site. Drupal's taxonomy system is what closed the deal for me. As cross-posting between departments is a priority, I really think that a TAC approach has got to be the foundation, but is OG really suitable as a partner? Thanks. I can really use some solid advice here.
Comment #25
lelizondo CreditAttribution: lelizondo commentedpatch in #2 worked for me.
Comment #26
McGrimm CreditAttribution: McGrimm commentedI've tested #2's patch and it looks like it works. I've created a bug report as paulbooker asked for so that this bug can be removed in the next version of OG forums.
User-Agent: User 2
Build Identifier: 6.19 [Acquia-Drupal install]
Description:
The following error is displayed when a group member tries to make a post within their group forums:
-warning: array_keys() [function.array-keys]: The first argument should be an array in C:\Users\Marcus\Sites\acquia-drupal\sites\all\modules\og_forum\og_forum.module on line 439.
-warning: in_array() [function.in-array]: Wrong datatype for second argument in C:\Users\Marcus\Sites\acquia-drupal\sites\all\modules\og_forum\og_forum.module on line 439.
Error does not display when Organic groups user roles(6.x-4.1) is off.
Reproducible: Always
Modules:
OG forum 6.x-2.2
Organic groups 6.x-2.1
Organic groups user roles 6.x-4.1
Organic groups Views integration 6.x-2.1
Plus other required modules
Steps to reproduce:
1- Install and turn on above modules and set permissions to let signed in users make forum posts.
2- Create group content type Test Group
3- Create a Test Group named Test
4- Create a 2nd user (Test Member)
5- Make Test Member join Test(the group)
6- Navigate to Test(the group)'s forums and try to make a post.
Expected Results:
No error displayed.
Actual Results:
Error displayed as shown in Description.
Proposed solution:
#2's patch.
Thanks,
McGrimm
Comment #27
callison CreditAttribution: callison commentedWell, it seems to me that this issue should be changed to "reviewed and tested by the community" so I'm going to go ahead and do that. I haven't tested the patch in #2 myself, but everyone seems to be fine with it.
Comment #28
jen.c.harlan CreditAttribution: jen.c.harlan commented+1
Comment #29
vegantriathlete