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
Updated by Florian Wessels over 4 years ago
The name of the command is language:update, of course ;-)
Updated by Georg Ringer over 4 years ago
- Related to Task #82315: Make "lang:language:update" a symfony console command added
Updated by Georg Ringer over 4 years ago
- Related to Bug #85694: CLI language:update doesn't update all languages on 7LTS,8LTS added
Updated by Georg Ringer over 4 years ago
- Status changed from New to Needs Feedback
Can't reproduce that (on master) as this should be fixed by #85694
./bin/typo3 language:update de fr pt -v Updating language packs of all activated extensions for locale(s) "de", "fr", "pt"
Updated by Florian Wessels over 4 years ago
This problem occurs only in the scheduler module, not on the console.
Updated by Florian Wessels over 4 years ago
- File Bildschirmfoto 2020-08-01 um 15.27.37.png Bildschirmfoto 2020-08-01 um 15.27.37.png added
- File Bildschirmfoto 2020-08-01 um 15.28.08.png Bildschirmfoto 2020-08-01 um 15.28.08.png added
- File Bildschirmfoto 2020-08-01 um 15.27.51.png Bildschirmfoto 2020-08-01 um 15.27.51.png added
The attached images should illustrate this behaviour.
Updated by Riccardo De Contardi about 4 years ago
- Status changed from Needs Feedback to New
Updated by Gerrit Code Review almost 4 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/67394
Updated by Gerrit Code Review over 3 years ago
Patch set 1 for branch 10.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/68993
Updated by Guido Schmechel over 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 0a37044c72ca76ecb914e74ecca7d857603ca840.