warning: Invalid argument supplied for foreach() in /var/www/vhosts/slank.com/httpdocs/labs/modules/forum/forum.module on line 670.

when i installed this module why i got this error ?? in my admin page there's no list my container or forum i already made...but in my forum page my container and forum show up... need a help please ..

Comments

michelle’s picture

Status: Active » Postponed (maintainer needs more info)

Are you actually using 2.x or did you just pick the latest from the version dropdown? If you are using 2.x, delete that and use 1.x. If you are getting this error on 1.x, what page is it on?

Michelle

kakajoe’s picture

im using advanced_forum-6.x-1.0.tar.gz .. like i told before

1. in my admin forum page .. when i add container in wont showing the list of my container and forum .. but,
2. in my Forum page it show up the list of my container and forum which i added..

sorry for my english ... thanks before

michelle’s picture

Version: 6.x-2.x-dev » 6.x-1.0

"like i told before"

No, actually, you have this issue marked as 2.x. Choosing the wrong version in the dropdown makes it harder to help you.

I'm having trouble following this. When you administer the forum, as in adding containers and forums, they aren't showing up on the admin page? If that's the case, this isn't AF related. Can you clarify? Screenshots would help since English is difficult for you.

Michelle

kakajoe’s picture

Version: 6.x-1.0 » 6.x-2.x-dev

// Loop through all node types for forum vocabulary.
foreach ($vocabulary->nodes as $type) {
// Check if the current user has the 'create' permission for this node type.
if (node_access('create', $type)) {
// Fetch the "General" name of the content type;
// Push the link with title and url to the array.
$forum_types[$type] = array('title' => t('Post new @node_type', array('@node_type' => node_get_types('name', $type))), 'href' => 'node/add/'. str_replace('_', '-', $type) .'/'. $variables['tid']);
}

this is forum.module on line 670 ... thank u before michele

michelle’s picture

Version: 6.x-2.x-dev » 6.x-1.0

Please don't set this back to 2.x as you already said you aren't using it.

That error is in the core forum module. It looks to me like you don't have the vocabulary set right. Probably http://drupal.org/node/90214

Michelle

kakajoe’s picture

it works in admin forum, but unfortanelly...in the forum page still showing the error message ... you can check my web in http://www.slank.com/labs/forum .. thanks

michelle’s picture

Did you try the page I gave you?

Also, disable Advanced Forum, clear your cache, and see if the error goes away. I suspect this doesn't have anything to do with Advanced Forum.

Michelle

kakajoe’s picture

i did try the page you gave me ... i also disable advanced forum, clear your cache but still the error message still coming up ... what should i do ??

michelle’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

If the error is still coming up, then you have something wrong with core forum / taxonomy. Due to time constraints, I can't dig into this further. I suggest starting a forum post with your problem and mention that you tried that page and maybe someone there can help you dig into it.

Good luck,

Michelle

oakulm’s picture

Do you have taxonomy vocab and terms for forum in Taxonomy menu? I had the same error when I accidentally deleted my forum taxonomy vocab. Forum worked just fine when I added forums and containers through admin/content/forum.