Support » Plugin: W3 Total Cache » Can’t activate: Uncaught ArgumentCountError: Too few arguments to function

  • Resolved hpthatsme

    (@hpthatsme)


    My conflict seems to be with something in iThemes Security Pro, though no other sites of mine are having this issue. I made sure to update php to 7.4, I even tried disabling iThemes, nothing works. Here is the error (with my url and file path masked):

    Fatal error: Uncaught ArgumentCountError: Too few arguments to function ITSEC_User_Logging::deactivated_plugin(), 1 passed in /****/****/****.com/wp-includes/class-wp-hook.php on line 287 and exactly 2 expected in /****/****/****.com/wp-content/plugins/ithemes-security-pro/pro/user-logging/class-itsec-user-logging.php:183 Stack trace: #0 /****/****/****.com/wp-includes/class-wp-hook.php(287): ITSEC_User_Logging->deactivated_plugin(‘w3-total-cache/…’) #1 /****/****/****.com/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(NULL, Array) #2 /****/****/****.com/wp-includes/plugin.php(478): WP_Hook->do_action(Array) #3 /****/****/****.com/wp-content/plugins/w3-total-cache/Util_Activation.php(28): do_action(‘deactivated_plu…’, ‘w3-total-cache/…’) #4 /****/****/****.com/wp-content/plugins/w3-total-cache/Util_Activation.php(41): W3TC\Util_Activation::_cleanup() #5 /****/****/****.com/wp-content/plugins/w3 in /****/****/****.com/wp-content/plugins/ithemes-security-pro/pro/user-logging/class-itsec-user-logging.php on line 183

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hpthatsme

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    Can you please share more information on when did the issue started to occur?
    Is this the first installation, or have you disabled W3 Total Cache, and the error occurred when attempted to re-activate?
    Have you made any changes, updates, or similar to the theme or other plugins before the started?
    Thanks!

    Thread Starter hpthatsme

    (@hpthatsme)

    This a new installation of W3 Total Cache. The error happened upon initial activation attempt.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hpthatsme

    Thank you for the information.
    The line in W3 Total cache that the Fatal error is showing is:
    do_action( 'deactivate_plugin', W3TC_FILE );
    The other plugin (iThemes Security Pro) may have an add_action() with that same hook name and is expecting more arguments. It appears that the free version of the mentioned plugin doesn’t have that class method, but Pro does.
    If you disable the ithemes-security-pro plugin, then you should be able to activate W3 Total Cache.
    Thanks!

    Thread Starter hpthatsme

    (@hpthatsme)

    I disabled iThemes Pro, and it still failed. I removed it, and it still failed. Here is the error:
    Plugin could not be activated because it triggered a fatal error.
    (Then a blank line)
    Then (then a button that says “re-activate plugin”)

    I can provide a screenshot if necessary.

    Thread Starter hpthatsme

    (@hpthatsme)

    I got it working. I had to remove the folders named “cache” and “w3tc-config”, then I copied the plugin folder from a different site I manage. The plugin then activated with no errors. I will move on to plugin configuration, hopefully all will work.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @hpthatsme

    Thank you for the information.
    Glad to know the issue is resolved.
    Thanks!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Can’t activate: Uncaught ArgumentCountError: Too few arguments to function’ is closed to new replies.