Using og_forum 5.x-2.x-dev, Drupal 5.7, og 5.x-7.3 with the lines added for og_forum,
when posting a new forum topic as an authenticated user, I get:
* warning: reset() [function.reset]: Passed variable is not an array or object in /home/drupal/public_html/sites/all/modules/og_forum/og_forum.module on line 1142.
* warning: key() [function.key]: Passed variable is not an array or object in /home/drupal/public_html/sites/all/modules/og_forum/og_forum.module on line 1143.
* warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/drupal/public_html/sites/all/modules/og_forum/og_forum.module on line 1144.
* warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/drupal/public_html/sites/all/modules/og_forum/og_forum.module on line 1144.
* warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/drupal/public_html/sites/all/modules/og_forum/og_forum.module on line 1144.
The Forums selection box is there. The page looks OK except for the warning messages.
When I submit the forum topic, the Warning messages are repeated, followed by:
"Your Forum topic has been created."
As administrator, I don't get the warning messages.
I have not installed ACL or forum_access on this site. I have not enabled any privacy or access control, that I know of.
I'm working on the problem I posted at http://drupal.org/node/282929 (No Forums selection list, and Invalid argument supplied for foreach() og_forum).
I started a new site, hallman.nccommunities.org, running under the same software installation as nccommunities.org (which has the problems I reported earlier). Enabled forums, created container "General" with forum "General discussion."
http://hallman.nccommunities.org/node/add/forum/2 looks fine. Has General discussion in the Forums dropdown selection box.
Enabled organic groups and created a group.
http://hallman.nccommunities.org/forum looks good. http://hallman.nccommunities.org/node/add/forum/2 has dropdown selection box. Is good.
Enabled og_forum 5.x-2.x-dev
As an authenticated user, http://hallman.nccommunities.org/node/add/forum/2 now has:
* warning: reset() [function.reset]: Passed variable is not an array or object in /home/drupal/public_html/sites/all/modules/og_forum/og_forum.module on line 1142.
* warning: key() [function.key]: Passed variable is not an array or object in /home/drupal/public_html/sites/all/modules/og_forum/og_forum.module on line 1143.
* warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/drupal/public_html/sites/all/modules/og_forum/og_forum.module on line 1144.
* warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/drupal/public_html/sites/all/modules/og_forum/og_forum.module on line 1144.
* warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/drupal/public_html/sites/all/modules/og_forum/og_forum.module on line 1144.
I inserted some print statements in function og_forum_form_alter:
* form_id: search_theme_form
* form_id: forum_node_form
* $group:
* arg(0): node
* arg(1): add
* arg(2): forum
* arg(3): 2
* nid:
* $GID:
I can't get anything to print past
if ($GID) {
I don't know php and am having trouble following what happens after " if ($GID) {"
Judy Hallman
Comments
Comment #1
Anonymous (not verified) commentedAs i cannot reproduce this problem with the latest drupal core & og contributed module on a bare bones setup with my current working copy of OG Forum what i will do is release a development release of OG Forum later today and hopefully that will solve your problem and also fix a number of issues in our queue.
Paul
Comment #2
hallman commentedUsing README.txt,v 1.5.2.1.2.7 2008/07/22 14:33:56 paulbooker
On this site, as an authenticated user
http://hallman.nccommunities.org/node/add/forum/2 gives
"warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/drupal/public_html/sites/all/modules/og_forum/og_forum.module on line 1270."
I got the same warning when I previewed and when I submitted.
Comment #3
hallman commentedChanging Priority to "normal." It works... It just gives a Warning message.
Comment #4
Anonymous (not verified) commentedPlease reopen this issue if it is not resolved in the latest development snapshot.
Comment #5
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #6
MaciejSchuttkowski commentedHi there!
I encountered the same problem in 5.x-2.2 ...
I have had my forums in containers once and as I removed them from their containers the warnings appeared.
After studiying the og_forum.module I've found that $all_results passed to array_key_exists on line 1275 was empty,
(i guess, because the forums don't have parents anymore)
so I added a check if $all_results is an array or object, now there are no more warnings.
Would be glad to get some feedback if this fixes the Problem!
(sorry, but I don't know how to supply patches for now, so I give you the "raw" code)
Comment #7
Anonymous (not verified) commentedThanks for your help Maciej,
I'll look into this tomorow morning
Comment #8
Anonymous (not verified) commentedThanks Maciej,
Ill get that fix committed late this week or early next week.
Comment #9
Anonymous (not verified) commentedComment #10
MaciejSchuttkowski commentedI'm glad I could help out :)
Comment #11
kobnim commentedHello,
I am experiencing the same problem with version 6.x-1.0. When I click "create forum topic" I get these errors:
Thanks,
Mindy
Comment #12
kobnim commentedHi, sorry for the extra message. I am resetting "status" to "active" for the message above.
Comment #13
Anonymous (not verified) commentedWould you provide a list of your contributed modules , thanks.
Comment #14
kobnim commentedHi Paul
Here is a list of the contributed modules on my system, as you requested:
Administration:
---------------
administration menu
cck:
----
content
content copy
content permissions
content taxonomy
content taxonomy autocomplete
content taxonomy options
fieldgroup
filefield
imagefield
nodereference
number
option widgets
text
content profile:
---------------
content profile
content profile user registration
Development:
---------------
devel
Form Elements:
---------------
hierarchical select
hierarchical select menu
hierarchical select taxonomy
Image:
---------------
Image
Image FUpload
Imagecache:
---------------
imageapi
ImageapiGD2
Mail:
---------------
Block user messages
Private messages
Organic groups:
---------------
OG Block visibility
OG Content Type Admin
OG forum
OG user roles
OG
OG access control
OG groups actions
OG views integration
Subgroups for Organic groups
Other:
---------------
Advanced help
Advanced help example
Automatic nodetitles
Image FUpload
jquery UI
Lightbox2
Logintoboggan
Pathauto
Taxonomy Manager
Token
Token Actions
StatusBook:
---------------
corkboard
fans
friends
statusbook
statusbook event
statusbook photo
statusbook poke
Views
---------------
Views
Views exporter
Views UI
Thanks for looking into this!
- Mindy
Comment #15
Anonymous (not verified) commentedComment #16
Anonymous (not verified) commentedComment #17
Anonymous (not verified) commentedComment #18
Anonymous (not verified) commentedWould you update this issue in the light of improved AF integration
http://drupal.org/node/386566
Comment #19
Anonymous (not verified) commentedHello,
In order to make best use of our time and fix any compatibility issues still remaining would someone please see if there is still a problem here on the latest 6.x-2.x-dev branch and if there is still a problem report this a new bug using the following schema ..
Please format your bugs as follows ...
Description:
Blah Blah Blah
Repeatable: Always | Sometimes
Steps to repeat:
1. Blah Blah Blah
2. Blah Blah Blah
..
Expected Results:
Blah Blah Blah
Actual Results:
Blah Blah Blah
Detail & Proposed solution:
Blah Blah Blah