-
Notifications
You must be signed in to change notification settings - Fork 427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WP4.0 MU i get permission error. #228
Comments
Hello, I guess I just had the same problem as yours only on multisite of wp 4.0. Around Line #221 of the TGM_Plugin_Activation class file (class-tgm-plugin-activation.php) Modify the line: To:
Note: you have to use double quotes for bracketing "{$hook}admin_menu". reference: http://stackoverflow.com/questions/13960514/how-to-adapt-my-plugin-to-multisite (see Adding an admin page) In MU, the hook name had to be "network_admin_menu" for the plugin to register the menu item (the function was not being called with the admin_menu hook name). Hope that this helps. |
Thanks BeFiveINFO for the detailed reply, I just replaced with To: $hook = is_multisite() ? 'network_' : ''; however, I still get same message when I click the Begin activating plugin "You do not have sufficient permissions to access this page." error on /wp-admin/network/themes.php?page=tgmpa-install-plugins let me know how to fix the problem. Thank you |
Hello, In my case, the error occurred because the installation page was not registered at all. The admin menu was not registered because the "admin_menu" function of the class was not called at "network_admin_menu" hook. I can only suggest you to check up the followings:
The public function of admin_menu() of the class need to be called for the page to be registered. You can find the admin_menu function at the line #333. To see if the function is called, you can try for example "echo 'test';" at the line #334 to see if WordPress is calling the function. Note: you can try the following lines to see currently registered admin menu items at any point: global $_registered_pages;
var_dump($_registered_pages); To see if admin_menu() is really registering, you can try the code at right under the line #350. Please let me know how it goes. |
I am having the same issue. TGMPA is being handled by Composer. Works fine with the exact same setup on a non-Multisite install. |
Been having this problem for a while as well, even though it was fixed on v2.2 here's how I fixed it. |
PR #247 applies this fix and also fixes the admin notice display for multisite. |
As on multisite by default plugins can only be installed from the network admin, it makes more sense showing the TGM page in the network admin and not in the site admin. On that same note, the admin notices should be shown on the network admin too. Related TGMPA#228, TGMPA#239 (cherry picked from commit ba8807e)
Thank you this saved me after a couple of hours of frustration! This really should be rolled into V2.5 as a temporary fix until the restructured behaviour is built in 3.0 |
@CodingSamurai While I understand your point, as MS is not supported at this moment, we shouldn't be giving the impression that it is, which is why this will not be included in v2.5. |
Hey, |
@quitoxic As indicated in the post just above yours: Multi-site is currently not supported by TGMPA nor could it be with the way it is set up at this moment. Making TGMPA multi-site compliant is one of our goals for version 3.0, but will involve major changes in how to indicate dependencies. |
I got a "You do not have sufficient permissions to access this page." error on /wp-admin/network/themes.php?page=tgmpa-install-plugins
current version is wordpress 4.0 Multisite
The text was updated successfully, but these errors were encountered: