Bug #91876
closedUpdating multiple language via scheduler will fail
100%
Description
When the update:language command is executed via the scheduler and several ISO codes are specified (separated by spaces - e.g.: de fr pt
), the execution of the task will fail:
Execution of task "Execute console commands (scheduler)" failed with the following message: Language iso code de pt_BR fr not available or active
What happens¶
The scheduler executes the task as follows: update:language 'de fr pt'
and this will break the process as the iso codes are passed as one argument.
Possible solutions¶
a) The following lines can be added to the execute method of the LanguagePackCommand
class to check whether the first argument contains spaces. If this is the case, the first argument would be split into multiple iso codes.
if (count($isos) === 1 && strpos($isos[0], ' ') !== false) {
$isos = GeneralUtility::trimExplode(' ', $isos[0], true);
}
b) Another possibility is to simply specify the iso codes separated by commas, as these are then automatically split by the ExecuteSchedulableCommandAdditionalFieldProvider
class (line 200). However, this would invalidate parts of #82315.
Files