• We have this plugin installed on a multisite install of WordPress, but only activated on one site so far.

    When a user who is not a multisite super-admin, and has a role of Editor tried to login after activating the plug, she saw a white screen and we found this error message in the log:

    PHP Fatal error:  Call to undefined function get_current_user_role() in /home/wpbarnha/public_html/wp-content/plugins/kwayy-html-sitemap/kwayy-html-sitemap.php on line 103

    Here is the code that is failing in your plugin file:

    }elseif(is_multisite() && !is_super_admin()){
                $theRoles = get_option('global-admin-bar-roles');
                if(!is_array($theRoles)){$theRoles = array();}
                if(!in_array(get_current_user_role(),$theRoles)){
                            add_options_page( 'Kwayy HTML Sitemap Options', 'Kwayy HTML Sitemap Options','manage_options', 'kwayyhs', 'kwayyhs_page' );
                    }

    I think the function get_current_user_role ought to be defined by the time this is called, based on my limited knowledge of the load order, but it’s not.

    As a temporary fix, we commented out the inner if-statement, so that the menu option always loads. That’s not a problem for this site, but it will be overwritten if the plugin is updated, and it’s not a long-term solution.

    (We also have the s2Member Pro plugin installed, which may be causing a conflict.)

    Can anyone shed any light on this issue?

    https://www.ads-software.com/extend/plugins/kwayy-html-sitemap/

Viewing 5 replies - 1 through 5 (of 5 total)
  • I’m seeing the same thing, WP MS 3.5.2. This plugin is definitely broken on MS.

    Same here, thanks for the (temp) fix.

    I have the same bug.
    -WordPress MultiSite v3.8.1
    -Kwayy HTML Sitemap v3.1
    Please fix the error and update plugins.

    Is this plugin still alive?
    No bug fixes and new functionality!

    I had the same problem. I’m also on WordPress 3.8.1 / Kwayy HTML Sitemap 3.1.

    At the very least a notice should be added to the plugin page to let multisite users know not to use it.

    It’s a nice plugin otherwise, for non-multisite users.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Kwayy HTML Sitemap permissions bug’ is closed to new replies.