Project

General

Profile

Actions

Bug #97156

open

Changing arguments and options in scheduled commands fails

Added by Alexander Grein over 2 years ago. Updated over 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2022-03-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

To reproduce add a symfony command with attributes and/or options to the scheduler task, change an attribute or options and press save.

The following PHP Warning will appear and the changes are not saved:
Core: Error handler (BE): PHP Warning: Undefined array key "command" in /app/private/typo3/sysext/scheduler/Classes/Task/ExecuteSchedulableCommandAdditionalFieldProvider.php line 100

Actions #1

Updated by Alexander Grein over 2 years ago

After a long trip I found out, that the problem comes from the property name (!) of one of my command options.

Only if the name is "action" the problem appears. This is independent wether it's an option or an attribute.

So, both of this configure methods produce the descripted problem:
protected function configure(): void { $this->addArgument('action', InputArgument::OPTIONAL, 'The name of the action', 'all'); }

protected function configure(): void { $this->addOption('action', null, InputOption::VALUE_REQUIRED, 'The name of the action', 'all'); }
Actions

Also available in: Atom PDF