• Resolved RL

    (@yofazza)


    Hello,

    WooCommerce cannot be activated after all plugins are disabled except:

    • WP-Bakery
    • advanced-cache.php in Drop-in tab
    • 6 plugins in the Must-Use tab (from WP Engine, the hosting company).

    ?

    The site uses WooCommerce for quite some time, but suddenly have this problem.

    Please guide me to the next troubleshooting steps (if no direct solution is available).

    This is one of the errors:

    PHP Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /nas/content/live/uniondocs/wp-includes/functions.php:5890\nStack trace:\n#0 /nas/content/live/uniondocs/wp-includes/functions.php(5890): in_array('mod_rewrite', NULL, true)\n#1 /nas/content/live/uniondocs/wp-admin/includes/misc.php(17): apache_mod_loaded('mod_rewrite', true)\n#2 /nas/content/live/uniondocs/wp-admin/includes/misc.php(281): got_mod_rewrite()\n#3 /nas/content/live/uniondocs/wp-includes/class-wp-rewrite.php(1874): save_mod_rewrite_rules()\n#4 /nas/content/live/uniondocs/wp-includes/rewrite.php(281): WP_Rewrite->flush_rules(true)\n#5 /nas/content/live/uniondocs/wp-content/plugins/woocommerce/includes/class-wc-post-types.php(649): flush_rewrite_rules()\n#6 /nas/content/live/uniondocs/wp-includes/class-wp-hook.php(307): WC_Post_Types::flush_rewrite_rules('')\n#7 /nas/content/live/uniondocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)\n#8 /nas/content/live/uniondocs/wp-includes/plugin.php(476): WP_Hook->do_action(Array)\n#9 /nas/content/live/uniondocs/wp-content/plugins/woocommerce/includes/class-wc-install.php(385): do_action('woocommerce_flu...')\n#10 /nas/content/live/uniondocs/wp-includes/class-wp-hook.php(307): WC_Install::install('')\n#11 /nas/content/live/uniondocs/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array)\n#12 /nas/content/live/uniondocs/wp-includes/plugin.php(476): WP_Hook->do_action(Array)\n#13 /nas/content/live/uniondocs/wp-admin/plugins.php(194): do_action('activate_woocom...')\n#14 {main}\n thrown in /nas/content/live/uniondocs/wp-includes/functions.php on line 5890, referer: https://uniondocs.org/wp-admin/plugins.php?plugin=woocommerce%2Fwoocommerce.php

    Thank you

    • This topic was modified 2 years, 5 months ago by RL.

    The page I need help with: [log in to see the link]

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Support Paulo P – a11n

    (@paulostp)

    Hello,

    Thanks for reaching out!

    I would suggest you perform a full conflict test. To perform tests without affecting your live site, you can use a staging site (your host might have that feature, but you can create it with WP Staging as an alternative).

    Then, set your staging site’s theme to Storefront, disable all plugins, and try to enable WooCommerce again.

    Let us know how it goes.

    Thread Starter RL

    (@yofazza)

    Hi,

    I removed all plugins including the must-use and drop-ins ones, in a staging site:

    https://undostaging.wpengine.com/shop/

    The text tab in wp-admin/plugins.php now reads:

    All (53) | Inactive (53) | Recently Active (2) | Auto-updates Disabled (53)

    Theme also changed to Twenty Twenty-Two.

    WordPress is updated.

    Still, if I click Activate, the error will come up.

    I found out that the errors also came up on some other plugins (but not all).

    Another direction will be very appreciated.

    Thank you.

    • This reply was modified 2 years, 5 months ago by RL.

    Hello,

    Could you please share a copy of your site’s System Status? You can find it via WooCommerce > Status. Select “Get system report” and then “Copy for support”.? Once you’ve done that, paste it here in your response.

    Thread Starter RL

    (@yofazza)

    Hi, I can’t activate WooCommerce.

    Plugin could not be activated because it triggered a fatal error.

    And here’s the error:

    PHP Fatal error: Uncaught TypeError: in_array(): Argument #2 ($haystack) must be of type array, null given in /nas/content/live/undostaging/wp-includes/functions.php:5834\nStack trace:\n#0 /nas/content/live/undostaging/wp-includes/functions.php(5834): in_array('mod_rewrite', NULL, true)\n#1 /nas/content/live/undostaging/wp-admin/includes/misc.php(17): apache_mod_loaded('mod_rewrite', true)\n#2 /nas/content/live/undostaging/wp-admin/includes/misc.php(267): got_mod_rewrite()\n#3 /nas/content/live/undostaging/wp-includes/class-wp-rewrite.php(1874): save_mod_rewrite_rules()\n#4 /nas/content/live/undostaging/wp-includes/class-wp-hook.php(307): WP_Rewrite->flush_rules(true)\n#5 /nas/content/live/undostaging/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array)\n#6 /nas/content/live/undostaging/wp-includes/plugin.php(474): WP_Hook->do_action(Array)\n#7 /nas/content/live/undostaging/wp-settings.php(609): do_action('wp_loaded')\n#8 /nas/content/live/undostaging/wp-config.php(128): require_once('/nas/content/li...')\n#9 /nas/content/live/undostaging/wp-load.php(50): require_once('/nas/content/li...')\n#10 /nas/content/live/undostaging/wp-admin/admin-ajax.php(22): require_once('/nas/content/li...')\n#11 {main}\n thrown in /nas/content/live/undostaging/wp-includes/functions.php on line 5834, referer: https://undostaging.wpengine.com/wp-admin/admin-ajax.php?action=tribe_process_async_process_support_test&nonce=9176001791

    Plugin Support Tamirat B. (a11n)

    (@tamirat22)

    Hello @yofazza!

    Thanks for the reply!

    I can’t activate WooCommerce.

    Plugin could not be activated because it triggered a fatal error.

    Can you please remove your existing WooCommerce installation via FTP instead of through your WordPress dashboard? You can then try installing a new one and see if that addresses the issue.

    Let us know how it turns out!

    Thread Starter RL

    (@yofazza)

    @tamirat22,

    I was looking to set up SSH access to do that (to make it quicker) when I got notification from the host:

    https://wpenginestatus.com/incidents/371898

    I did some tests after seeing it and yes 99% chance it is caused by it. I waited and the issue resolved 3 hours ago. Reverted back to PHP 8 and seems like there’s no more problem.

    I’m really sorry for all the troubles.

    Thank you.

    • This reply was modified 2 years, 5 months ago by RL.
Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cannot activate plugin’ is closed to new replies.