• Resolved Kylen Downs

    (@kdowns)


    When installing and activating the most recent version (5.169.1) through WP-CLI, the plugin outputs the following fatal error and fails to activate.

    $ wp plugin install cleantalk-spam-protect --activate
    Installing Spam protection, AntiSpam, FireWall by CleanTalk (5.169.1)
    Downloading installation package from https://downloads.wordpress.org/plugin/cleantalk-spam-protect.5.169.1.zip...
    Unpacking the package...
    Installing the plugin...
    Plugin installed successfully.
    Activating 'cleantalk-spam-protect'...
    Fatal error: Uncaught Error: Call to undefined function Cleantalk\ApbctWP\apbct_settings__get_ajax_type() in local/Sites/test/wp-content/plugins/cleantalk-spam-protect/lib/Cleantalk/ApbctWP/Activator.php:15
    Stack trace:
    #0 local/Sites/test/wp-content/plugins/cleantalk-spam-protect/cleantalk.php(408): Cleantalk\ApbctWP\Activator::activation(NULL)
    #1 local/Sites/test/wp-includes/class-wp-hook.php(303): apbct_activation(NULL)
    #2 local/Sites/test/wp-includes/class-wp-hook.php(327): WP_Hook->apply_filters('', Array)
    #3 local/Sites/test/wp-includes/plugin.php(470): WP_Hook->do_action(Array)
    #4 local/Sites/test/wp-admin/includes/plugin.php(698): do_action('activate_cleant...', NULL)
    #5 phar:///usr/local/Cellar/wp-cli/2.5.0/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(333): activate_plugin('cleantalk-spam-...', '', NULL)
    #6 phar:///usr/local/Cellar/wp-cli/2.5.0/bin/wp/vendor/wp-cli/extension-command/src/WP_CLI/CommandWithUpgrade.php(250): Plugin_Command->activate(Array)
    #7 phar:///usr/local/Cellar/wp-cli/2.5.0/bin/wp/vendor/wp-cli/extension-command/src/Plugin_Command.php(809): WP_CLI\CommandWithUpgrade->install(Array, Array)
    #8 [internal function]: Plugin_Command->install(Array, Array)
    #9 phar:///usr/local/Cellar/wp-cli/2.5.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/CommandFactory.php(100): call_user_func(Array, Array, Array)
    #10 [internal function]: WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}(Array, Array)
    #11 phar:///usr/local/Cellar/wp-cli/2.5.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Dispatcher/Subcommand.php(491): call_user_func(Object(Closure), Array, Array)
    #12 phar:///usr/local/Cellar/wp-cli/2.5.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(399): WP_CLI\Dispatcher\Subcommand->invoke(Array, Array, Array)
    #13 phar:///usr/local/Cellar/wp-cli/2.5.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(422): WP_CLI\Runner->run_command(Array, Array)
    #14 phar:///usr/local/Cellar/wp-cli/2.5.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1194): WP_CLI\Runner->run_command_and_exit()
    #15 phar:///usr/local/Cellar/wp-cli/2.5.0/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(23): WP_CLI\Runner->start()
    #16 phar:///usr/local/Cellar/wp-cli/2.5.0/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(77): WP_CLI\Bootstrap\LaunchRunner->process(Object(WP_CLI\Bootstrap\BootstrapState))
    #17 phar:///usr/local/Cellar/wp-cli/2.5.0/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(27): WP_CLI\bootstrap()
    #18 phar:///usr/local/Cellar/wp-cli/2.5.0/bin/wp/php/boot-phar.php(11): include('phar:///usr/loc...')
    #19 /usr/local/Cellar/wp-cli/2.5.0/bin/wp(4): include('phar:///usr/loc...')
    #20 {main}
      thrown in local/Sites/test/wp-content/plugins/cleantalk-spam-protect/lib/Cleantalk/ApbctWP/Activator.php on line 15

    Attempting to activate the currently inactive plugin with wp plugin activate cleantalk-spam-protect, it outputs the same fatal error.

    The plugin does activate without issue from the WordPress dashboard.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Support sergecleantalk

    (@sergecleantalk)

    Hello,

    Could you tell us your webserver PHP version and WordPress version?

    Thread Starter Kylen Downs

    (@kdowns)

    Tested on a couple of production sites running WP 5.8.2 + PHP 7.4 as well as a local site running WP 5.8.3 + PHP 8.0.

    Plugin Support sergecleantalk

    (@sergecleantalk)

    I’ve tried to install and activate 5.169.1 on WordPress 5.8.3 + PHP 7.4 and found no problems. We also didn’t receive such reports yet. Seems like another plugin is interfering with Anti-Spam. Could you try to disable plugins one by one?

    Thread Starter Kylen Downs

    (@kdowns)

    I set the active theme to twentytwenty and deactivated all other plugins. WP-CLI is still outputting that error referencing cleantalk-spam-protect/lib/Cleantalk/ApbctWP/Activator.php:15

    *Note this is a fresh install of CleanTalk and so has not been connected to the API or had an access key submitted.

    I did run a test where I added an access key and verified the connection. I then deactivated the CleanTalk plugin and again attempted to activate it via WP-CLI. Same error.

    I’m running WP-CLI 2.5.0 on local and the prod sites were running 2.4.0.

    Plugin Support sergecleantalk

    (@sergecleantalk)

    We will test WP-CLI 2.5.0 in our environment and contact you. It may take 2-3 business days.

    Plugin Support amagsumov

    (@amagsumov)

    Hello @kdowns

    We’ve fixed the issue. Please install fix version:
    https://github.com/CleanTalk/wordpress-antispam/releases/download/fix-version/cleantalk-spam-protect.zip

    – Go to WordPress Administrator Panel ��> Plugins.

    – Find the plugin “Anti-Spam by CleanTalk” —> Deactivate.

    – After the automatic page refreshing find the plugin again “Anti-Spam by CleanTalk” —> Delete. Confirm files deletion.

    – Download the plugin archive from the link.

    – Go to Plugins —> Add New —> Upload Plugin.

    – Choose the downloaded archive and press “Install Now”.

    Did it help?

    Thread Starter Kylen Downs

    (@kdowns)

    Cheers! Looks like that fix is working. Thank you!

    Plugin Support SergeM

    (@serge00)

    You are welcome, @kdowns!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Fatal error on plugin activation – WP-CLI’ is closed to new replies.