• Resolved Damien Poudret

    (@damien-poudret)


    Hi

    after installing and activating, I can’g open the extension settings page : “not enough rights”…
    Too bad, the previous version was really meeting my needs.

    BR
    Damien

Viewing 4 replies - 1 through 4 (of 4 total)
  • If your settings link is taking you to <siteroot>plugins.php?page=member_access, this is wrong (at least in my version of wordpress, 3.0.3) you can correct it by modifying this file:

    /wp-content/plugins/member-access/lib/MemberAccess.php

    search for the function “renderOptionsLink”, note the line i commented out, and the replacement beneath.

    function renderOptionsLink($links, $file)
        {
            static $plugin_dir = null;
            if(null === $plugin_dir) {
                $plugin_dir = plugin_basename(__FILE__);
                $plugin_dir = substr($plugin_dir, 0, stripos($plugin_dir, '/'));
            }
    
            if (dirname($file) == $plugin_dir) {
                $view = new MemberAccess_Structure_View('options-link.phtml');
                // jwatson fix for wp 3.0.3 this is wrong. make options-general.php
                //$view->set('link_href' , 'plugins.php?page=member_access');
                $view->set('link_href' , 'options-general.php?page=member_access');
                $view->set('link_title', sprintf(__('%s Settings', 'member_access'), 'Member Access'));
                $view->set('link_text' , __('Settings', 'member_access'));
                ob_start();
                $view->render();
                array_unshift($links, ob_get_clean());
            }
            return $links;
        }

    Thanks redgibson. Worked perfectly.

    Plugin Author brownoxford

    (@brownoxford)

    Thanks for making this fix public redgibson, the settings page will be fixed in the next release. In the meantime, also note that the link in the Settings admin menu does still work.

    No problem, glad it is getting merged into the next release. If i get time this weekend I’ll set up the plugin and see if I can fix the admin settings menu issue. I encountered this issue at a client site so I am not in front of the code base currently.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: Member Access] Can't access plugin settings : "not enough rights"’ is closed to new replies.