Plugin not being restricted

Hi guys, I'm not sure how long this has been like this as I have done prior tests and not noticed it, but plugins don't seem to be getting restricted to premium levels lower than whats required. Showing correct when a free site though and Themes seem to be reacting okay. Seems very odd.

Any help will be hugely appreciated.

  • Milan

    Hello Lex

    Hope you are well today and thanks for asking us. :slight_smile:

    I can see that you have restricted many plugins for pro level only, so is this happening with all the plugins or there are few ones which are affected by this behaviour ? Could you please explain this further ?

    Also it would be useful if you can enable debug mode to your site by replacing this line

    define ( "WP_DEBUG", false );

    of wp-config.php file( you'll need ftp access to do this ), with these ones,

    define ( "WP_DEBUG", true );
    define ( "WP_DEBUG_LOG", true );
    define ( "WP_DEBUG_DISPLAY", false );

    Save the file and then try to replicate issue, this should generate /wp-content/debug.log, download it manually, rename it as debug.txt and upload it in your next reply.

    Look forward to hearing back from you. :slight_smile:
    Best Regards,
    Milan

  • Lex

    Hey Milan,

    Many thanks for getting back to me. It appears to be for all plugins. Logging in as an administrator of a lower Premium site, shows all upper level plugins as free across the board.

    I done a plugin and theme test last night for another reason and keep an eye on this issue throughout. Couldn't seem to pin point it anywhere.

    Please find file attached as requested, I in fact had this still active from the last debug.

  • Adam Czajczyk

    Hello Lex!

    I accessed your site and checked it. I had to create myself an account on two of them ("hollowwater" - premium level, "alnabullion" - elite level) of "administrator" user role and I can see what's happening. I downgraded both accounts to a regular subscriber for now.

    I would like you however to run one more test, please:

    - go to the "Pro Sites" modules page
    - disable the "Premium Plugins" module and save settings
    - enable the "Premium Plugins Manager" module and save settings
    - then go to "Pro Sites -> Premium Plugins Manager" and try setting plugins' availability once again.

    The difference is that with "Premium Plugins Manager" you set the plugins explicitly available for a selected level instead of setting "minimum level" but I'd like to know whether this module behaves the same on your site or if it works.

    Could you please give it a try and let me know about the result?

    Best regards,
    Adam

  • Lex

    This seems to be working and is only showing the plugins available to the correct user, but this does mean lower levels can't see the plugins that are available. Is there is anyway for me to show them, I'll just keep it this way round.

    Also sorry I've deleted your account off the hollow one as it's actually a clients site they are looking around tonight and I don't want them to be alarmed by the account. If you could create an account on mysite._.com that is all good to nose to about. :slight_smile:

  • Dimitris

    Hey there Lex,

    hope you're doing good and don't mind chiming in! :slight_smile:

    I'm glad that the alternative path worked for you.
    Now, I created a simple MU plugin for you which actually builds a table the way is being displayed in "Premium Plugins Manager" settings page

    To enable it, simply download the .zip file, uncompress it and copy the .php file in /wp-content/mu-plugins/ folder of your installation (if it doesn't exists, just create it).

    Please mind that this last part

    // add table in global footer
    // change to an action that makes more sense
    // add_action('wp_footer','prosites_plugins');

    There's no output at the moment as I commented out the "wp_footer" action I used for testing. If you un-comment (remove //) the last line, you should be able to see the table after the footer of every page.

    This should be changed according to where you want to display this table. If you could point me to a page/url and a more specific spot inside it, I can provide you the right action (if any).

    Warm regards,
    Dimitris :slight_smile:

    • Lex

      Thanks Dimitris I'm a little bit lost on that last bit, could it be made to only show on the bottom of the pretty plugins page?

      wp-admin/admin.php?page=pretty-plugins.php

      I do fear I have something a bit more complex as a problem that I think maybe the route cause though. I have also just found through usage that I cannot access wp-admin/themes.php as super admin on other sites.

      Clicking the "Super Admin, please note that standard theme page can still be accessed at this URL."

      Just takes me to wp-admin/themes.php?default=1

      Which looks exactly the same as wp-admin/themes.php?page=multisite-theme-manager.php

      I had a lot of trouble earlier on with defender not finishing changing all the database, I just wonder if this is what is playing up here maybe?

  • Dimitris

    Hey there Lex,

    Thanks Dimitris I'm a little bit lost on that last bit, could it be made to only show on the bottom of the pretty plugins page?
    wp-admin/admin.php?page=pretty-plugins.php

    Also sorry is it at all possible I could make each of these titles in the list link to an external url? I fear it maybe a little non descriptive and I'll create pages to describe each if possible. I was planning a codex

    I attach you a new version of the MU plugin which creates this table with plugins under the pretty plugins page. Additionally, I linked each plugin name in a slug based on their text domain slug, which should be unique for each of them. So now, you can build some frontend pages for each plugin with extra info and usage details. :wink:

    Clicking the "Super Admin, please note that standard theme page can still be accessed at this URL."
    Just takes me to wp-admin/themes.php?default=1
    Which looks exactly the same as wp-admin/themes.php?page=multisite-theme-manager.php

    There's on issue here, just in case this makes you wonder, here's the basic difference between administrators.
    Super admin can see this screen
    http://fish.viktoo.com/wp-admin/themes.php?page=multisite-theme-manager.php
    white other site admins can see
    http://fish.viktoo.com/wp-admin/themes.php?default=1
    Please notice that there're no filters or search bar on the second link. :wink:

    Warm regards,
    Dimitris

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.