Forums

Member Access
[resolved] Can't access plugin settings : "not enough rights" (5 posts)

  1. Damien Poudret
    Member
    Posted 1 year ago #

    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

  2. redgibson
    Member
    Posted 1 year ago #

    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;
        }
  3. jboverhof
    Member
    Posted 1 year ago #

    Thanks redgibson. Worked perfectly.

  4. brownoxford
    Member
    Posted 1 year ago #

    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.

  5. redgibson
    Member
    Posted 1 year ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic