Project

General

Profile

Actions

Bug #91876

closed

Updating multiple language via scheduler will fail

Added by Florian Wessels almost 4 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
scheduler
Target version:
-
Start date:
2020-07-27
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.2
Tags:
Complexity:
no-brainer
Is Regression:
Sprint Focus:

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


Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Task #82315: Make "lang:language:update" a symfony console commandClosedAlexander Schnitzler2017-09-06

Actions
Related to TYPO3 Core - Bug #85694: CLI language:update doesn't update all languages on 7LTS,8LTSClosed2018-07-31

Actions
Actions

Also available in: Atom PDF