| User | Post |
|
9:03 pm 21 Aug 2008
| sju
Member
| | | |
|
| posts 12 |
|
|
Hi,
Wordpress 2.6
Simple Forum 3.1.3
After installation I receive the following error message:
Warning: Invalid argument supplied for foreach() in /var/www/ubfcommunity.europe/wp-content/plugins/simple-forum/forum/sf-permissions.php on line 29
Please assist.
|
|
|
|
|
Can you check your admin details are correct in the Forum Options > Admin tab? Plus - when logged in and getting this error are you loggedin as a WP and forum admin?
Just to put your mind at rest however, there is no damage being done. But it does need fixing.
|
|
|
10:33 pm 21 Aug 2008
| sju
Member
| | | |
|
| posts 12 |
|
|
When I am logged in as an administrator in Wordpress and then open the forum site then I am logged in with my wordpress administrator login.
However when I then click on logout I receive the news I just posted above.
|
|
|
1:07 am 22 Aug 2008
| Mr Papa
Moderator
| | Arizona, USA | |
|
| posts 1602 |
|
|
Out of curiousity, do you not have any users and/or user groups defined? this error stems from not having any memberships in user groups. Even guests to your site should be given temp membership in the Guests user group unless you deleted that user group. with this error, its unlikely that anyone but the admin can do anything in the forum until you have some user group memberships…
As Andy mentions, there should probably be a code guard around that foreach statement, but this still indicates to me, you have not set something up right…
|
|
|
6:00 am 25 Aug 2008
| sju
Member
| | | |
|
| posts 12 |
|
|
Hi,
I have installed user groups. It seems to me that the file sf-permissions.php has problems when you set a password to the Wordpress page for example “forum”
Then I have problems in lines 29 and 145:
foreach ($GLOBALS['memberships'] as $ugid)
When I do not put a password on the page then it works. However I would like to put another password for security reasons.
Looking forward to your answer.
|
|
|
6:33 am 25 Aug 2008
| Mr Papa
Moderator
| | Arizona, USA | |
|
| posts 1602 |
|
|
several folks have reported this issue and I cant understand why… it clearly means you dont have user group memberships… are you getting this on nonforum pages or the forum page? perhaps a template tag is doing a wrong access…
regardless, the fix for the error is simple… in sf-permissions.php, right before the referenced error, line 29, add this statement
if (empty($GLOBALS['memberships'])) return '';
please be careful if you try to copy from above as you may get unwanted formatting… best to retype…
Its good programming practice anyways, and has already been fixed (albeitly slightly differently) in the upcoming v3.2…
I would still like to get to the bottom of the error with memberships in user groups defined, but it doesnt appear to affect the forum display at all…
|
|
|
7:53 pm 25 Aug 2008
| sju
Member
| | | |
|
| posts 12 |
|
|
Problem solved. Thank you!
Two more questions:
1. After I have typed in the login name and the password I always have to refresh one more time so that I can see the Guest account change to my own account. Is this normal or is there a way to change this?
2. When I click on “Lost Password”, then I receive the error message: This option has been disabled by the security filter.” I would like to give this option to the users who register. How can I solve this issue?
|
|
|
|
|
- No this is not normal and I have no idea what might be causing this although, it may well be conected to the answer for number 2.
- This message does not come from the forum and, in fact, does not come from WP either., That just leaves another plugin you have active.
|
|