MerlinWP icon indicating copy to clipboard operation
MerlinWP copied to clipboard

Plugin is not activated during first setup

Open monparaashvin opened this issue 6 years ago • 8 comments

Hello Sir...@richtabor I'm testing this plugin with our theme and everything works perfect like charm.

The only issue I have face that, second plugin in list is not able to active. Here is the screenshot : screenshot

Here is the log : [2018-12-04 13:12:44] merlin-logger.DEBUG: A plugin with the following data will be processed {"plugin_slug":"elementor","message":"Activating"} [] [2018-12-04 13:12:44] merlin-logger.DEBUG: A plugin with the following data was processed {"plugin_slug":"elementor"} [] [2018-12-04 13:12:44] merlin-logger.DEBUG: A plugin with the following data will be processed {"plugin_slug":"meta-box","message":"Activating"} [] [2018-12-04 13:12:44] merlin-logger.DEBUG: A plugin with the following data will be processed {"plugin_slug":"meta-box","message":"Activating"} [] [2018-12-04 13:12:44] merlin-logger.DEBUG: A plugin with the following data will be processed {"plugin_slug":"redux-framework","message":"Activating"} [] [2018-12-04 13:12:47] merlin-logger.DEBUG: A plugin with the following data was processed {"plugin_slug":"redux-framework"} []

Looks like it tries to activate plugin two times.

Thank you.

monparaashvin avatar Dec 04 '18 13:12 monparaashvin

We had the same issue. (With another plugin) Not sure what is causing it, but when including only the problematic plugin in TGMPA it did work fine.

SecondLineThemesHQ avatar Dec 05 '18 10:12 SecondLineThemesHQ

Hi @monparaashvin, do you mind posting a gist of the TMPGA plugins array that you're including? I'd like to run some tests with it.

richtabor avatar Dec 05 '18 19:12 richtabor

Here is array:-

$plugins = array(
        array(
            'name' => __('Elementor', 'txtdomain'),
            'slug' => 'elementor',
            'required'   => true,
        ),
        array(
            'name' => esc_html__( 'Meta Box', 'txtdomain' ),
            'slug' => 'meta-box',
            'required'   => true,
        ),
        array(
            'name' => esc_html__('MetaSlider', 'txtdomain'),
            'slug' => 'ml-slider',
        ),
        array(
            'name' => esc_html__('MailPoet 2', 'txtdomain'),
            'slug' => 'wysija-newsletters',
        ),

        array(
            'name'  => esc_html__( 'Contact Form 7', 'txtdomain' ),
            'slug'  => 'contact-form-7',
        ),
        array(
            'name' => esc_html__('Redux Framework', 'txtdomain'),
            'slug' => 'redux-framework',
            'required'   => true,
        ),
        array(
            'name' => esc_html__('WooCommerce', 'txtdomain'),
            'slug' => 'woocommerce',
        ),
        array(
            'name' => esc_html__('YITH WooCommerce Compare', 'txtdomain'),
            'slug' => 'yith-woocommerce-compare',
        ),
        array(
            'name' => esc_html__('YITH WooCommerce Wishlist', 'txtdomain'),
            'slug' => 'yith-woocommerce-wishlist',
        ),
    );

monparaashvin avatar Dec 06 '18 04:12 monparaashvin

Hi @richtabor Please test array the Merlin WP if you have time...

monparaashvin avatar Dec 08 '18 04:12 monparaashvin

Hi @monparaashvin, I ran some tests and here's what I found:

It looks like when Elementor is first, Meta Box does not want to install next. I'm not sure why.

So I next removed the requirement from Elementor, so I could move the plugin somewhere else in the list. That put Elementor right before MailPoet 2, which now did not want to install (again, after Elementor).

Findings: Anything after Elementor was not wanting to install.

richtabor avatar Dec 11 '18 11:12 richtabor

Yup just found out about Elementor myself!

Looks like they have a splash screen right after the plugin's activation on a regular installation (no TGMPA / MerlinWP)

However, TGMPA does succeed when trying to install Elementor before a bunch of other plugins.

I'll look further into the splash screen and see if it's really the cause of the above issue, perhaps it could be removed with a filter.

-- EDIT -- @richtabor @monparaashvin Looks like the following code solves the issue:

function theme_prefix_remove_elementor_splash() { 
	delete_transient( 'elementor_activation_redirect' );
}
add_action( 'init', 'theme_prefix_remove_elementor_splash' );

By the way - Looks like MerlinWP is re-ordering the plugins from the array by alphabetical order. This means that even if you do place Elementor or any other problematic plugin last, it might still not be fixed. (Unless you use some code to fix the issue like suggested above)

SecondLineThemesHQ avatar Dec 11 '18 12:12 SecondLineThemesHQ

Hi @monparaashvin, I ran some tests and here's what I found:

It looks like when Elementor is first, Meta Box does not want to install next. I'm not sure why.

So I next removed the requirement from Elementor, so I could move the plugin somewhere else in the list. That put Elementor right before MailPoet 2, which now did not want to install (again, after Elementor).

Findings: Anything after Elementor was not wanting to install.

I think it is about after activationg theme action, may be need to disable elementor after activation actions

Ninetheme avatar Mar 28 '19 17:03 Ninetheme