Skip to content

Rerunning command doesn't work #523

@FabioPedretti

Description

@FabioPedretti

Bug Report

Describe the current, buggy behavior

I updated to wp-cli nigthly and now when I have a plugin error I get this suggestion:
Would you like to run the command again with --skip-plugins=dynamic-text?
I type y, but then I get a error:
Error: Parameter errors: unknown --skip-plugins parameter

$ wp plugin deactivate dynamic-text
PHP Fatal error:  Uncaught Error: Undefined constant "wipeout" in /srv/www/mysite/wp-content/plugins/dynamic-text/dynamic_text_options.php:28
Stack trace:
#0 /srv/www/mysite/wp-includes/class-wp-hook.php(341): DynamicTxtOptions->delSingleVal()
#1 /srv/www/mysite/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
#2 /srv/www/mysite/wp-includes/plugin.php(522): WP_Hook->do_action()
#3 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php(223) : eval()'d code(176): do_action()
#4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php(223): eval()
#5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php(70): WP_CLI\Context\Admin->load_admin_environment()
#6 /srv/www/mysite/wp-includes/class-wp-hook.php(339): WP_CLI\Context\Admin->WP_CLI\Context\{closure}()
#7 /srv/www/mysite/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
#8 /srv/www/mysite/wp-includes/plugin.php(522): WP_Hook->do_action()
#9 /srv/www/mysite/wp-settings.php(764): do_action()
#10 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1911): require('...')
#11 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1802): WP_CLI\Runner->load_wordpress()
#12 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(31): WP_CLI\Runner->start()
#13 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(87): WP_CLI\Bootstrap\LaunchRunner->process()
#14 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(35): WP_CLI\bootstrap()
#15 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('...')
#16 /usr/local/bin/wp(4): include('...')
#17 {main}
  thrown in /srv/www/mysite/wp-content/plugins/dynamic-text/dynamic_text_options.php on line 28
Fatal error: Uncaught Error: Undefined constant "wipeout" in /srv/www/mysite/wp-content/plugins/dynamic-text/dynamic_text_options.php:28
Stack trace:
#0 /srv/www/mysite/wp-includes/class-wp-hook.php(341): DynamicTxtOptions->delSingleVal()
#1 /srv/www/mysite/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
#2 /srv/www/mysite/wp-includes/plugin.php(522): WP_Hook->do_action()
#3 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php(223) : eval()'d code(176): do_action()
#4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php(223): eval()
#5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php(70): WP_CLI\Context\Admin->load_admin_environment()
#6 /srv/www/mysite/wp-includes/class-wp-hook.php(339): WP_CLI\Context\Admin->WP_CLI\Context\{closure}()
#7 /srv/www/mysite/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
#8 /srv/www/mysite/wp-includes/plugin.php(522): WP_Hook->do_action()
#9 /srv/www/mysite/wp-settings.php(764): do_action()
#10 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1911): require('...')
#11 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1802): WP_CLI\Runner->load_wordpress()
#12 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(31): WP_CLI\Runner->start()
#13 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(87): WP_CLI\Bootstrap\LaunchRunner->process()
#14 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(35): WP_CLI\bootstrap()
#15 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('...')
#16 /usr/local/bin/wp(4): include('...')
#17 {main}
  thrown in /srv/www/mysite/wp-content/plugins/dynamic-text/dynamic_text_options.php on line 28
Error: There has been a critical error on this website.

Uncaught Error: Undefined constant "wipeout" in /srv/www/mysite/wp-content/plugins/dynamic-text/dynamic_text_options.php:28
Stack trace:
#0 /srv/www/mysite/wp-includes/class-wp-hook.php(341): DynamicTxtOptions->delSingleVal()
#1 /srv/www/mysite/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
#2 /srv/www/mysite/wp-includes/plugin.php(522): WP_Hook->do_action()
#3 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php(223) : eval()'d code(176): do_action()
#4 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php(223): eval()
#5 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Context/Admin.php(70): WP_CLI\Context\Admin->load_admin_environment()
#6 /srv/www/mysite/wp-includes/class-wp-hook.php(339): WP_CLI\Context\Admin->WP_CLI\Context\{closure}()
#7 /srv/www/mysite/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters()
#8 /srv/www/mysite/wp-includes/plugin.php(522): WP_Hook->do_action()
#9 /srv/www/mysite/wp-settings.php(764): do_action()
#10 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1911): require('...')
#11 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Runner.php(1802): WP_CLI\Runner->load_wordpress()
#12 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/WP_CLI/Bootstrap/LaunchRunner.php(31): WP_CLI\Runner->start()
#13 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/bootstrap.php(87): WP_CLI\Bootstrap\LaunchRunner->process()
#14 phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php(35): WP_CLI\bootstrap()
#15 phar:///usr/local/bin/wp/php/boot-phar.php(20): include('...')
#16 /usr/local/bin/wp(4): include('...')
#17 {main}
  thrown

This error may have been caused by the plugin dynamic-text.
To skip this plugin, run the command again with:
  --skip-plugins=dynamic-text

Would you like to run the command again with --skip-plugins=dynamic-text? [y/n] y
Error: Parameter errors:
 unknown --skip-plugins parameter

Rerunning command with --skip-plugins=dynamic-text...

Describe what you would expect as the correct outcome

The Would you like to run the command again with --skip-plugins=dynamic-text? should work.

Let us know what environment you are running this on

OS:	Linux 6.1.0-44-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.164-1 (2026-03-09) x86_64
Shell:	/bin/bash
PHP binary:	/usr/bin/php8.2
PHP version:	8.2.30
PHP memory limit:	-1
php.ini used:	/etc/php/8.2/cli/php.ini
MySQL binary:	/usr/bin/mariadb
MySQL version:	mariadb  Ver 15.1 Distrib 10.11.14-MariaDB, for debian-linux-gnu (x86_64) using  EditLine wrapper
SQL modes:	
WP-CLI root dir:	phar://wp-cli.phar/vendor/wp-cli/wp-cli
WP-CLI vendor dir:	phar://wp-cli.phar/vendor
WP_CLI phar path:	phar:///usr/local/bin/wp
WP-CLI packages dir:	
WP-CLI cache dir:	/homeb/.wp-cli/cache
WP-CLI global config:	
WP-CLI project config:	
WP-CLI version:	2.13.0-alpha-75afa05

Provide a possible solution

If I run it specifying myself the parameter the command completes fine:

mysite@web:/srv/www/mysite$ wp plugin deactivate dynamic-text --skip-plugins=dynamic-text
Plugin 'dynamic-text' deactivated.
Success: Deactivated 1 of 1 plugins.

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions