Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

List of required and recommended plugins is displayed on theme options pages #104

Closed
michielvoo opened this Issue · 12 comments

7 participants

@michielvoo

Using NHP Options, on the theme options page (/wp-admin/admin.php?page=theme_options) the list of recommended plugins is displayed after the theme options.

Same when using the UpTheme options (/wp-admin/themes.php?page=upfw-settings).

Normally this list is displayed on /wp-admin/themes.php?page=install-required-plugins.

@ramzesimus

I have similar issue but notice duplicates on Theme Options page (I'm using Options Framework by Devin Price).

@jackdavenport

I have the exact same problem as ramzesimus... every admin panel in WordPress works fine, except for the theme options page with the Options Framework.

The warning to install plugins is the exact same, only I get to see it twice in that screen, one under the other.

@michielvoo

So the problem is definitely with a code path that any theme options framework would follow. Somehow that code path triggers the display of the list of plugins.

@thomasgriffin

I've tested with a theme that uses the Options Framework (Radius by Mike McAlister) and there were no issues. My guess is that whoever developed the theme did not use TGMPA properly.

I have noticed, however, that on some theme options pages, the notice is output twice. This is actually a bug with WordPress and their failure to properly handle the Settings API message outputs correctly. See this trac ticket: http://core.trac.wordpress.org/ticket/21211

I'll work on a way to fix that, but in regards to this particular issue, it is up to the theme developer to ensure that they set TGMPA up correctly. I can only do so much. ;-)

@michielvoo

@thomasgriffin I'm not talking about the notice (the yellow bar at the top of the screen) but rather the plugin table (http://tgmpluginactivation.com/images/plugin-table.png). Did you scroll down below the theme options and see the plugin table in the Radius theme?

What particular incorrect set up of TGMPA could lead to this issue? It may not be very common, but common enough to happen to three of us, so if we could get some guidance here, that would help.

Thanks!

@jackdavenport

I am currently using the theme Slate by Mike McAlister and can see 2 warning yellow alert boxes on the Theme Options page.

Has Mike set one theme up correctly and one theme not? I would like to fix this issue myself but also need a little guidance to do so.

@nosecreek

I was having this same issue and had to add 'menu' => 'install-required-plugins' to my $config array. Seems to be working properly now.

@jackdavenport

I already have that added to my $config array...

@nosecreek

In functions.php there should be a function called my_theme_register_required_plugins() or similar which will include the variable $config, which is an array of options. Add it there or, if the $config variable does not exist, add the following line before the call to tgmpa(): $config = array('menu' => 'install-required-plugins');

@jackdavenport

yeah i found it straight after... it was already there, it did not change anything when i took it out and the re added it in

@maimairel

Also experiencing this issue, after searching through the source file, line 1593 seems to be the cause.

if ( ! class_exists( 'WP_Upgrader' ) && ( isset( $_GET[sanitize_key( 'page' )] ) && TGM_Plugin_Activation::$instance->menu = $_GET[sanitize_key( 'page' )] ) ) {

This overwrites the TGM_Plugin_Activation::$menu variable, thus if you didn't set the variable on tgmpa_init, the plugins table will appear on every menu page because is_tgmpa_page will always return true

@rohitink

I am having the same problem, My config array contains 'menu' => 'install-required-plugins'

Buy, still, the notices are being show twice on all other settings pages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.