Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
Welcome, Guest
Please Login or Register.    Lost Password?
FireBoard Manual Latest release discussions Download FireBoard Spread FireBoard!
Solved:Invalid argument supplied for foreach()... (1 viewing) (1) Guest
Go to bottom Favoured: 0
TOPIC: Solved:Invalid argument supplied for foreach()...
#20312
Solved:Invalid argument supplied for foreach()... 1 Year, 2 Months ago  
I'm getting the following error after the upgrade... I even left the database in tact and did an uninstall then reinstall of the component....

Warning: Invalid argument supplied for foreach() in /home/xxxxxxx/public_html/components/com_fireboard/template/default/fb_pathway.php on line 139

Any ideas???
mrmckeen (User)
Junior Boarder
Posts: 21
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/09/07 22:24 By palebluedot. Reason: User Resolved Issue - Modifying Title
 
The administrator has disabled public write access.  
#20324
Re:Invalid argument supplied for foreach()... 1 Year, 2 Months ago  
I believe I found the problem... there was one additional SQL script that I had not completed... seems to be working fine now.
mrmckeen (User)
Junior Boarder
Posts: 21
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#20326
Re:Invalid argument supplied for foreach()... 1 Year, 2 Months ago  
Please mark as solved once you have verified things are working fine.
palebluedot (Moderator)
FB Documentation Team
Template Documentation Project
Moderator
Posts: 622
graphgraph
User Offline Click here to see the profile of this user
Gender: Male Location: Minneapolis, MN US Birthdate: 1973-01-12
Logged Logged
 
 
The administrator has disabled public write access.  
#20458
Re:Invalid argument supplied for foreach()... 1 Year, 2 Months ago  
I'm getting the same error message when viewing categories and posts.

I am updating from 1.0.1

I updated the database tables individually using myPHPAdmin and copying and pasting the following code in the SQL section for each table.

[code:1] /* Alter table in Second database */
alter table `jos2_fb_categories`
add column `headerdesc` text NOT NULL after `description`,
add column `class_sfx` varchar(20) NOT NULL after `headerdesc`,
add column `id_last_msg` int(10) NOT NULL DEFAULT '0' after `class_sfx`,
add column `numTopics` mediumint(8) NOT NULL DEFAULT '0' after `id_last_msg`,
add column `numPosts` mediumint(8) NOT NULL DEFAULT '0' after `numTopics`,
add column `time_last_msg` int(11) NULL after `numPosts`,
add KEY `msg_id`(`id_last_msg`), COMMENT='';

/* Alter table in Second database */
alter table `jos2_fb_messages`
add column `modified_by` int(7) NULL after `moved`,
add column `modified_time` int(11) NULL after `modified_by`,
add column `modified_reason` tinytext NULL after `modified_time`, COMMENT='';
/* Create table in Second database */

create table `jos2_fb_ranks`(
`rank_id` mediumint(8) unsigned NOT NULL auto_increment ,
`rank_title` varchar(255) NOT NULL ,
`rank_min` mediumint(8) unsigned NOT NULL DEFAULT '0' ,
`rank_special` tinyint(1) unsigned NOT NULL DEFAULT '0' ,
`rank_image` varchar(255) NOT NULL ,
PRIMARY KEY (`rank_id`)
);


/* Alter table in Second database */
alter table `jos2_fb_users`
add column `personalText` tinytext NULL after `uhits`,
add column `gender` tinyint(4) NOT NULL DEFAULT '0' after `personalText`,
add column `birthdate` date NOT NULL DEFAULT '0000-00-00' after `gender`,
add column `location` varchar(50) NULL after `birthdate`,
add column `ICQ` varchar(50) NULL after `location`,
add column `AIM` varchar(50) NULL after `ICQ`,
add column `YIM` varchar(50) NULL after `AIM`,
add column `MSN` varchar(50) NULL after `YIM`,
add column `SKYPE` varchar(50) NULL after `MSN`,
add column `hideEmail` tinyint(1) NOT NULL DEFAULT '1' after `SKYPE`,
add column `showOnline` tinyint(1) NOT NULL DEFAULT '1' after `hideEmail`,
add column `rank` tinyint(4) NOT NULL DEFAULT '0' after `showOnline`,
add column `GTALK` varchar(50) NULL after `rank`,
add column `websitename` varchar(50) NULL after `GTALK`,
add column `websiteurl` varchar(50) NULL after `websitename`, COMMENT='';

INSERT INTO `jos2_fb_ranks` (`rank_id`, `rank_title`, `rank_min`, `rank_special`, `rank_image`) VALUES
(1, 'Fresh Boarder', 0, 0, 'rank1.gif'),
(2, 'Junior Boarder', 20, 0, 'rank2.gif'),
(3, 'Senior Boarder', 40, 0, 'rank3.gif'),
(4, 'Expert Boarder', 80, 0, 'rank4.gif'),
(5, 'Gold Boarder', 160, 0, 'rank5.gif'),
(6, 'Platinum Boarder', 320, 0, 'rank6.gif'),
(7, 'Administrator', 0, 1, 'rankadmin.gif'),
(8, 'Moderator', 0, 1, 'rankmod.gif'),
(9, 'Spammer', 0, 1, 'rankspammer.gif');

UPDATE `jos2_fb_users` SET `rank`=8 WHERE `moderator`=1 AND `rank`=0;
[/code:1]

When doing this I got the duplicate header error message when trying to update the categories table and I got #1054 - Unknown column 'uhits' in 'jos2_fb_users' when trying to update the users table.

Any help would be greatly appreciated.
aynz (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/09/06 13:19 By aynz.
 
The administrator has disabled public write access.  
#20468
Re:Invalid argument supplied for foreach()... 1 Year, 2 Months ago  
palebluedot wrote:
Please mark as solved once you have verified things are working fine.

I tried but I could not find where to do that... is there a flag or do you simply type in the word "SOLVED"? I've seen it done both ways on different boards. Thanks for your help...
mrmckeen (User)
Junior Boarder
Posts: 21
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#20471
Re:Invalid argument supplied for foreach()... 1 Year, 2 Months ago  
mrmckeen wrote:
palebluedot wrote:
Please mark as solved once you have verified things are working fine.

I tried but I could not find where to do that... is there a flag or do you simply type in the word "SOLVED"? I've seen it done both ways on different boards. Thanks for your help...


Do not move this to solved yet, I am still having an issue and awaiting a reply to my post. Cheers.
aynz (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
#20480
Re:Invalid argument supplied for foreach()... 1 Year, 2 Months ago  
Don't mark this as solved please...

I am getting the same message too in a testsite I tried it, updated from 1.0.1 (on the testsite too), everything went ok in the the database update with the same script aynz posted.


[code:1]Warning: Invalid argument supplied for foreach() in /xxx/public_html/testsite/components/com_fireboard/template/default/fb_pathway.php on line 139[/code:1]

I also get this:

[code:1]Warning: Invalid argument supplied for foreach() in /xxx/public_html/testsite/components/com_fireboard/template/default/plugin/who/whoisonline.php on line 75

Warning: Invalid argument supplied for foreach() in /xxx/public_html/testsite/components/com_fireboard/template/default/plugin/who/whoisonline.php on line 102[/code:1]

both these lines are
[code:1]foreach ($users as $user)[/code:1]

Any ideas?
alou (User)
Junior Boarder
Posts: 98
graphgraph
User Offline Click here to see the profile of this user
The game is On!
Logged Logged
 
Last Edit: 2007/09/06 14:27 By alou.
 
 
The administrator has disabled public write access.  
#20486
Re:Invalid argument supplied for foreach()... 1 Year, 2 Months ago  
I went back and reran the sql script and watched each time to see where it failed. i then removed that piece of the script and ran it again until I got down to the last two sections in the script that finally completed. If it fails at any time the remaining script will not run. Once it finally finished completely everything cleared up...

I hope that helps.
mrmckeen (User)
Junior Boarder
Posts: 21
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2007/09/06 14:35 By mrmckeen. Reason: spelling
 
The administrator has disabled public write access.  
#20491
Re:Invalid argument supplied for foreach()... 1 Year, 2 Months ago  
It does

Apparently I did something wrong on the previous db update, so I runned the db script again and both problems are solved

Thanks!
alou (User)
Junior Boarder
Posts: 98
graphgraph
User Offline Click here to see the profile of this user
The game is On!
Logged Logged
 
 
The administrator has disabled public write access.  
#20496
Re:Invalid argument supplied for foreach()... 1 Year, 2 Months ago  
Yep worked for me too, thanks mrmckeen
aynz (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
The administrator has disabled public write access.  
Go to top