Open parkmap opened 10 years ago
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) https://github.com/thomasgriffin/TGM-Plugin-Activation/blob/master/class-tgm-plugin-activation.php
Modify the line: -add_action( 'admin_menu', array( $this, 'admin_menu' ) );
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 -add_action( 'admin_menu', array( $this, 'admin_menu' ) );
To:
$hook = ismultisite() ? 'network' : ''; add_action("{$hook}admin_menu", array( $this, 'admin_menu' ) );
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. First remove the line " 'force_activation' => true," from within the $plugins = array(..) Then change the array " 'is_automatic' => false, " to true under the $config = array(..) Seems to be a conflict somewhere. Hope this helps
PR #247 applies this fix and also fixes the admin notice display for multisite.
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, I have no experience so far with PHP and getting this problem, same thing multisite etc. I have been trying to follow the instructions on this thread but faild to make it work. Could any one help me out?
@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