Admin can't change options wp 2.8.1 - no sufficient permissions | Simple:Press Version 4.0.0 to 4.0.4 | Support Forum

Your Ad Here
Current User: Guest
Please consider registering


Lost Your Password?

Search Forums:


 






Wildcard Usage:
*    matches any number of characters
%    matches exactly one character

Admin can't change options wp 2.8.1 – no sufficient permissions

Information
UserPost

5:24 am
Jun 21, 2009


sonolento

Guest

 
1

With wp 2.8.1. + SimplePress 4.0.3. one can't access any of the forum admin pages.

One gets a "You do not have sufficient permissions to access this page." message.

7:24 am
Jun 21, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 11675

 
2

have you turned on the block admin option in the forum – options – global tab?  if so, turn it off and your users will be able to get to the back end (our MOST requested feature).

Visit Cruise Talk Central
Visit Mr Papa's World

7:43 am
Jun 21, 2009


sonolento

Guest

 
3

This option has been turned off (using wp 2.8). In wp 2.8.1. one can't even open that menu to change it.

The problem must have to do with the new permission checks in 2.8.1.

"Extra security has been put in place to better protect you from plugins that do not do explicit permission checks." in Wordpress dev blog

7:46 am
Jun 21, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 11675

 
4

Why do you think that is applicable to SPF?? I ask because when that trac ticket was committed, I wondered what it was all about…

We do explicit permission checks… And we have been running 2.8.1 here with no issues…

I can try to do some more research too…

Visit Cruise Talk Central
Visit Mr Papa's World

7:55 am
Jun 21, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 11675

 
5

Post edited 9:56 am – Jun 21, 2009 by Mr Papa


Well, of course…  leave it to the wp devs to change something and break plugins on a bug fix point release (one that shouldnt have been needed if they had properly tested in the first place!)…

Yes, this is going to cause problems with wp 2.8.1…   Its not released yet, so will see if we can get a ANOTHER wp compatibility release up before they release…

thanks for bringing this to our attention!

Visit Cruise Talk Central
Visit Mr Papa's World

7:59 am
Jun 21, 2009


sonolento

Guest

 
6

Exactly.

Thanks. And keep this great plugin going!

8:22 am
Jun 21, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 11675

 
7

looks like its not really a permissions issue but they want menu and submenu pages added in a different order…

Are you up to trying a quick change for me to see if it solves it for you?

Visit Cruise Talk Central
Visit Mr Papa's World

8:45 am
Jun 21, 2009


sonolento

Guest

 
8

Post edited 10:46 am – Jun 21, 2009 by sonolento


Ok. What do I need to change?

8:49 am
Jun 21, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 11675

 
9

find file sf-admin-header.php…  in routine sfa_admin_menu(), we need to reorder the add menu and add subpage stuff…  do the add menu first and then the sub-menus…   its a fairly simple re-ordering, but will paste the whole routine

function sfa_admin_menu()
{
    global $current_user;

    $status = sf_get_system_status();
    if ($status == 'ok')
    {
        $parent = 'simple-forum/admin/sf-adminforums.php';

        if (sf_current_user_can('SPF Manage Options') ||
            sf_current_user_can('SPF Manage Forums') ||
            sf_current_user_can('SPF Manage Components') ||
            sf_current_user_can('SPF Manage User Groups') ||
            sf_current_user_can('SPF Manage Permissions') ||
            sf_current_user_can('SPF Manage Database') ||
            sf_current_user_can('SPF Manage Users') ||
            sf_current_user_can('SPF Manage Admins') ||
            sf_get_member_item($current_user->ID, 'moderator'))
        {
            if(function_exists('add_object_page'))
            {
                add_object_page('Simple:Press Forum', __('Forum', 'sforum'), 8, $parent, '', 'div');
            } else {
                add_menu_page('Simple:Press Forum', __('Forum', 'sforum'), 8, $parent, '');
            }

            add_submenu_page($parent, __('Online Help', 'sforum'), __('Online Help', 'sforum'), 0, 'simple-forum/admin/sf-adminpopuphelp.php');
        }

        if (sf_current_user_can('SPF Manage Forums'))
        {
            add_submenu_page($parent, __('Forums', 'sforum'), __('Forums', 'sforum'), 0, 'simple-forum/admin/sf-adminforums.php');
        }
        if (sf_current_user_can('SPF Manage Options'))
        {
            add_submenu_page($parent, __('Options', 'sforum'), __('Options', 'sforum'), 0, 'simple-forum/admin/sf-adminoptions.php');
        }
        if (sf_current_user_can('SPF Manage Components'))
        {
            add_submenu_page($parent, __('Components', 'sforum'), __('Components', 'sforum'), 0, 'simple-forum/admin/sf-admincomponents.php');
        }
        if (sf_current_user_can('SPF Manage User Groups'))
        {
            add_submenu_page($parent, __('Usergroups', 'sforum'), __('User Groups', 'sforum'), 0, 'simple-forum/admin/sf-adminusergroups.php');
        }
        if (sf_current_user_can('SPF Manage Permissions'))
        {
            add_submenu_page($parent, __('Permissions', 'sforum'), __('Permission Sets', 'sforum'), 0, 'simple-forum/admin/sf-adminpermissions.php');
        }
        if (sf_current_user_can('SPF Manage Users'))
        {
            add_submenu_page($parent, __('Users', 'sforum'), __('Users', 'sforum'), 0, 'simple-forum/admin/sf-adminusers.php');
        }
        if (sf_current_user_can('SPF Manage Admins') || sf_get_member_item($current_user->ID, 'moderator'))
        {
            add_submenu_page($parent, __('Admins', 'sforum'), __('Admins', 'sforum'), 0, 'simple-forum/admin/sf-adminadmins.php');
        }
        if (sf_current_user_can('SPF Manage Database'))
        {
            add_submenu_page($parent, __('Database', 'sforum'), __('Database', 'sforum'), 0, 'simple-forum/admin/sf-admindatabase.php');
        }
    } else {

        if(function_exists('add_object_page'))
        {
            $parent = 'simple-forum-install';
        } else {
            $parent = 'simple-forum/sf-loader.php';
        }

        if(function_exists('add_object_page'))
        {
            add_object_page('Simple:Press Forum', __("Forum", "sforum"), 'activate_plugins', $parent, '', 'div');
        } else {
            add_menu_page('Simple:Press Forum', __("Forum", "sforum"), 'activate_plugins', $parent, '');
        }

        if($status == 'Install')
        {
            add_submenu_page($parent, __("Install Simple:Press Forum", "sforum"), __("Install Simple:Press Forum", "sforum"), 'activate_plugins', 'simple-forum/sf-loader.php');
        } else {
            add_submenu_page($parent, __("Upgrade Simple:Press Forum", "sforum"), __("Upgrade Simple:Press Forum", "sforum"), 'activate_plugins', 'simple-forum/sf-loader.php');
        }
    }
}

Be careful when cutting and pasting as you will get munged quotes…  If you can make your way around code, I think it will be pretty obvious what the actual changes are (moved add menu page stuff before add submenu page)…

this fixes any issues for me, but would be nice to get confirmation…

Visit Cruise Talk Central
Visit Mr Papa's World

9:06 am
Jun 21, 2009


sonolento

Guest

 
10

Bingo! This solves it.

Thanks.

9:08 am
Jun 21, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 11675

 
11

ah good… thanks for the confirmation…

We will try to get a patch or new 4.0.4 version up before too long, but its Father's Day so probably not today…

Visit Cruise Talk Central
Visit Mr Papa's World

1:21 am
Jun 23, 2009


madvaneik

Guest

 
12

Hi can someone give me the sf-adminheader.php? Don´t know where to put in the code. I need the Plugin very soon please help!

6:27 am
Jun 23, 2009


Mr Papa

Arizona, USA

SPF Master
SPF Master

posts 11675

 
13

just copy the routine above… its not the final solution as it needs some tweaking, but will get you running… watch out for the quotes getting messed up when you copy…

the official 4.0.4 will be releasing today or tomorrow…

Visit Cruise Talk Central
Visit Mr Papa's World

8:20 am
Jun 23, 2009


madvaneik

Guest

 
14

it doesnt work for me! I copy the lines in the php data and now i see nothing in wordpress

8:45 am
Jun 23, 2009


partireper.it

World

Member

posts 133

 
15

Same with me Mr Papa.

The routine doesn't fix my problem. WP 2.8.1 beta 1 won't work:

Parse error: syntax error, unexpected T_STRING in …….wp-content/plugins/simple-forum/admin/sf-admin-header.php on line 106

Information


Reply to Topic:
Admin can't change options wp 2.8.1 – no sufficient permissions

Guest Name (Required):

Guest Email (Required):

NOTE: First Posts are subject to administrator approval before being displayed

Smileys
Confused Cool Cry Embarassed Frown Kiss Laugh Smile Surprised Wink Yell
Post New Reply

Guest URL (required)

Math Required!
What is the sum of:
10 + 11
   


Information



About the Simple:Press Forum forum

Forum Timezone: America/Chicago

Most Users Ever Online: 96

Currently Online: foz, peterhol, theclone
57 Guests

Currently Browsing this Topic:
1 Guest

Forum Stats:

Groups: 3
Forums: 9
Topics: 4578
Posts: 33111

Membership:

There are 3275 Members
There have been 1296 Guests

There are 2 Admins
There are 2 Moderators

Top Posters:

jim – 297
ovizii – 232
Tal – 177
David Polensky – 173
Barandum – 135
partireper.it – 133

Recent New Members: Benintendo, davidberger, Expat Dale, TeunisD, carefreemats, kimjcastleberry

Administrators: Yellow Swordfish (12142 Posts), Mr Papa (11675 Posts)

Moderators: -Radio- (1235 Posts), Luffer (360 Posts)