warning: Invalid argument supplied for foreach() in /var/www/vhosts/mysite/modules/forum/forum.module on line 678.

Option core activated modules: all selected (devel site, what did you expect :-)
Contributed modules: devel and poormanscron

Comments

Anonymous’s picture

FYI: I get error when I select "forum" from navigation

Anonymous’s picture

Priority: Normal » Minor

You can suppress these from displaying by setting the php variable display_errors to 0. I agree that these minor nits are bugs but not a big deal.

mot’s picture

Status: Active » Postponed (maintainer needs more info)

When do you get this error? Please post Steps to reproduce.

mot’s picture

I will eventually try to reproduce this error report until september the first.

akwala’s picture

Version: 6.2 » 6.3

I have one forum, and no containers. Logged in as admin, when I click on the Forums link under navigation, I see the following, in red:

warning: Invalid argument supplied for foreach() in /var/www/blahdeblah.com/modules/forum/forum.module on line 678.

Under this, is the following message, which is puzzling, since I'm logged in as admin:

You are not allowed to post new content in forum.

--aslam

akwala’s picture

Version: 6.3 » 6.4

http://www.blahdeblah.com/forum gives the following:

warning: Invalid argument supplied for foreach() in /var/www/blahdeblah.com/modules/forum/forum.module on line 678.

* You are not allowed to post new content in forum.

Forum Topics Posts Last post
Feedback regarding this website. 0 0 n/a

Above, "Feedback regarding this website." is a link -- http://www.blahdeblah.com/forum/3 -- and clicking it also gives:

Feedback regarding this website.
warning: Invalid argument supplied for foreach() in /var/www/blahdeblah.com/modules/forum/forum.module on line 678.

* You are not allowed to post new content in forum.

Topic Replies Created Last reply[sort icon]

This forum does have a couple of forum topics, but they don't appear in the above scenarios.

mot’s picture

Status: Postponed (maintainer needs more info) » Closed (fixed)

akwala: The links you provded lead to nothing. I have a forum on my 6.5 running as well and can not reproduce your problem because I still miss steps to reproduce this problems. I even was not able to reproduce it my trying. I close this issue until steps to reproduce are provided.

akwala’s picture

Sorry, those links weren't real.

I just checked again -- now that I have Drupal 6.5. This particular error doesn't appear. However, the following URLs still show that the forums and forum topics are empty when they are not:

/forum/ - all forums show 0 for Topics and Posts, and n/a for Last post

/forum/3 (or any other #/topic) - there's nothing under any of the columns

Perhaps I should open a new issue?

--aslam

alauddin’s picture

Hi,

I had the same issue and solved it with the following.

http://drupal.org/node/235571

See post#3

Alauddin

- Basically just add the following in 'vocabulary' table as I checked couple of dbs and the forum vid = 0

vid, name, description, help, relations, hierarchy, multiple, required, tags, module, weight
0, Forums, , , 0, 1 , 0 , 0 , 0 , forum , -10

akwala’s picture

Thanks for the tip, Alauddin.

I didn't know this when I first created the forums. I ended up creating a vocabulary independently of the forum module. So, I have 2 vocabularies, "Tags" & "Forums", and I've been using the "Forums" vocab as if it were for the forum module, but it's not. Here's the record in table 'vocabulary':

vid | name  |  description | help | relations | hierarchy | multiple | required | tags | module  |   weight
  1 | Forums|              |      |       1   |     2     |     0    |      1   |    0 | taxonomy|   0

The vid for the newly created forum, "Temp Forum", following your instructions, is 0.

How should I fix this? Should I change the module field to "forum" as well? If I do that, what would the ramifications be?

--aslam