WPIntell

Source evidence

Insufficient Permissions Error

WPCore Plugin Manager · support · 2015-06-11T01:45:00+00:00

mixedsentiment
highseverity
0.95relevance
7replies
Evidence linked to opportunitycommercial context

Proof Health

Open evidence

Commercial opportunities need traceable source links before they are treated as build-worthy.

5 / 31 rows with source links

16.1% of this page's analysis has direct source links.

0 build-decision rows missing links

0 rows here require auditable proof before promotion.

26 rows with no attached evidence

0 rows have source counts but still need direct links.

Conversation

support
DowntownRob resolved
Using the latest version of the popular X theme, when I try installing plugins by clicking on the Install Plugins on the WP Core settings page, it gives a insifficient permissions error. I saw the other thread about the theme using the same class or something, can you make your class unique so it doesn’t conflict with themes? https://wordpress.org/plugins/wpcore/ Which version of wpcore are you using? The TGM activation plugin was updated and I pushed an update to that in the plugin. The TGM class is built to allow for multiple appearances of it. Do you know what version the TGM plugin of x-theme uses? Actually nevermind. I have purchased it in the past. Here is a note from within the framework: /** * NOTE: X uses a customized version of the TGM Plugin Activation class * We are aware of the potential add_query_arg vulnerability and have * updated the file taken precautions against this. There is no true * risk either way, as everything in here requires administrator privledges. */ This might have something to do with it. I will have to take a look and see if I can figure this out. Sorry for the error you are getting. Found the issue: In X Theme. In the file framework/functions/global/admin/tmg/registration.php is the following: // Remove "Install Plugins" Submenu Item // ============================================================================= if ( ! function_exists( 'x_remove_tgm_install_menu_item' ) ) : function x_remove_tgm_install_menu_item() { remove_submenu_page( 'themes.php', 'install-required-plugins' ); } add_action( 'admin_menu', 'x_remove_tgm_install_menu_item', 9999 ); endif; What this does is force remove the default plugin install page for the TGM activation class. This is what causes the problem. I will do some more testing but I believe that any other theme or plugin using TGM will likely run into similar issues. However I will keep looking into it. Even stranger, in the same file on line 130, the theme declares the exact slug which it later removes. 'default_path' => 'tgmpa-install-plugins', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', The ‘menu’ key sets the key there. Thats not even the key used at wpcore. I also just removed wpcore completely in a test and I still don’t get the plugin activation suggestions that should be coming through X theme. Ok even more testing. So any plugin that makes use of the TGM Class will not work with X Theme. The issue is that they declare the ‘menu’ key and then remove that exact key from the admin. This is because the framework is using the TGM class as the basis for a very customized addons installer. This is not a nice way to play. The simple fix in x theme is to not do the above. Aside from that there is really nothing I can do to fix it short of rewriting and using a customized version of TGM. But that would not play nice with others either. Se currently, aside form x theme, if you have a site that has a theme, and plugins using the TGM class simultaneously they all just work together. The plugin list just grows to include recommended plugins from all. Its really sweet and happy. But if someone goes and removes the menu slug, then everyone loses. But what do I know anyway? They’re the millionaires. Marking this a resolved since it appears to be an issue with X theme. Gotcha, ok thanks so much, good to know about the X theme.

Comments

7 shown
stueynet 2015-06-11T03:03:00+00:00

Which version of wpcore are you using? The TGM activation plugin was updated and I pushed an update to that in the plugin. The TGM class is built to allow for multiple appearances of it. Do you know what version the TGM plugin of x-theme uses?

stueynet 2015-06-11T03:12:00+00:00

Actually nevermind. I have purchased it in the past. Here is a note from within the framework: /** * NOTE: X uses a customized version of the TGM Plugin Activation class * We are aware of the potential add_query_arg vulnerability and have * updated the file taken precautions against this. There is no true * risk either way, as everything in here requires administrator privledges. */ This might have something to do with it. I will have to take a look and see if I can figure this out. Sorry for the error you are getting.

stueynet 2015-06-11T03:21:00+00:00

Found the issue: In X Theme. In the file framework/functions/global/admin/tmg/registration.php is the following: // Remove "Install Plugins" Submenu Item // ============================================================================= if ( ! function_exists( 'x_remove_tgm_install_menu_item' ) ) : function x_remove_tgm_install_menu_item() { remove_submenu_page( 'themes.php', 'install-required-plugins' ); } add_action( 'admin_menu', 'x_remove_tgm_install_menu_item', 9999 ); endif; What this does is force remove the default plugin install page for the TGM activation class. This is what causes the problem. I will do some more testing but I believe that any other theme or plugin using TGM will likely run into similar issues. However I will keep looking into it.

stueynet 2015-06-11T03:39:00+00:00

Even stranger, in the same file on line 130, the theme declares the exact slug which it later removes. 'default_path' => 'tgmpa-install-plugins', 'parent_menu_slug' => 'themes.php', 'parent_url_slug' => 'themes.php', 'menu' => 'install-required-plugins', The ‘menu’ key sets the key there. Thats not even the key used at wpcore. I also just removed wpcore completely in a test and I still don’t get the plugin activation suggestions that should be coming through X theme.

stueynet 2015-06-11T03:59:00+00:00

Ok even more testing. So any plugin that makes use of the TGM Class will not work with X Theme. The issue is that they declare the ‘menu’ key and then remove that exact key from the admin. This is because the framework is using the TGM class as the basis for a very customized addons installer. This is not a nice way to play. The simple fix in x theme is to not do the above. Aside from that there is really nothing I can do to fix it short of rewriting and using a customized version of TGM. But that would not play nice with others either. Se currently, aside form x theme, if you have a site that has a theme, and plugins using the TGM class simultaneously they all just work together. The plugin list just grows to include recommended plugins from all. Its really sweet and happy. But if someone goes and removes the menu slug, then everyone loses. But what do I know anyway? They’re the millionaires.

stueynet 2015-06-19T21:09:00+00:00

Marking this a resolved since it appears to be an issue with X theme.

DowntownRob 2015-06-19T21:21:00+00:00

Gotcha, ok thanks so much, good to know about the X theme.