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?

CommentFileSizeAuthor
#2 og_forum-694690.patch899 bytesmonotaga
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Uncle Nug’s picture

I have the same issue :(

monotaga’s picture

Version: 6.x-2.2 » 6.x-2.x-dev
Status: Active » Needs review
FileSize
899 bytes

There 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.

h2rra’s picture

Thanks! Seems to work properly now:)

dayre’s picture

Was 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.

Anonymous’s picture

Assigned: Unassigned »

Would someone provide clear steps to reproduce this problem ?

Best,
Paul Booker

sadist’s picture

I 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!

AntiNSA’s picture

I am also having the same issue... will try the patch...

AntiNSA’s picture

Priority: Normal » Critical

After 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.

djhspence’s picture

subscribe

ginc’s picture

+1

poprocks’s picture

My 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.

dadderley’s picture

Happening for me too on a production server.

Ole Martin’s picture

For 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.

dadderley’s picture

I am using Organic groups user roles 6.x-4.1 as well.

ginc’s picture

We are using Organic groups user roles 6.x-4.1 as well. we need its functionality.

AntiNSA’s picture

me too

Ole Martin’s picture

I will try out a sandbox in this week-end and if I find something .. I need it also

Anonymous’s picture

If 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

pumpkinkid’s picture

Hmm, the patch on #2 worked for me, and I am still able to select which forum to post in unlike on #8

KaaRoy’s picture

Same issue here. Subscribing.

KaaRoy’s picture

Something 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.

Anonymous’s picture

Assigned: » Unassigned
Ivanhoe123’s picture

Thank you, I had the same issue and OG user roles were causing it

robatk’s picture

I'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.

lelizondo’s picture

patch in #2 worked for me.

McGrimm’s picture

I'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

callison’s picture

Status: Needs review » Reviewed & tested by the community

Well, 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.

jen.c.harlan’s picture

+1

vegantriathlete’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Closed (won't fix)