Project

General

Profile

Actions

Bug #85694

closed

CLI language:update doesn't update all languages on 7LTS,8LTS

Added by J. Peter M. Schuler over 5 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Could have
Assignee:
-
Category:
-
Target version:
-
Start date:
2018-07-31
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
7
PHP Version:
7.0
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

CLI/TYPO3CMS language:update (with an empty typo3conf/l10n folder) only updates the first language mentioned in the output properly.
Example:

Updating language packs of all activated extensions for locales "da, nl, de" 

This results in only typo3conf/l10n/da being filled properly; typo3conf/l10n/nl is not even created, typo3conf/l10n/de has only one subfolder.

Debugging results until now:
  • This very same behaviour is true for 7LTS and 8LTS (didn't check 9LTS yet).
  • Updating a single language like language:update de results in correct behaviour, so the language packages are actually available
  • Reducing the number of configured languages to one results in correct behaviour.
  • Updating all languages via Web/Backend works, however it seems that that button actually is updating single languages one by one.

Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #91876: Updating multiple language via scheduler will failClosed2020-07-27

Actions
Actions #1

Updated by Guido Schmechel over 5 years ago

Test with version 9.4.dev

$ ./typo3/sysext/core/bin/typo3 language:update de => OK
$ ./typo3/sysext/core/bin/typo3 language:update da => OK
$ ./typo3/sysext/core/bin/typo3 language:update no => OK
$ ./typo3/sysext/core/bin/typo3 language:update => OK (de,da,no exists)

$ ./typo3/sysext/core/bin/typo3 language:update da,de,no
[RuntimeException]
Language iso code da,de,no not available or active

Test with v8

Works:
Updating language packs of all activated extensions for locales "de"
52/52 [============================] 100%
$ ./typo3/cli_dispatch.phpsh extbase language:update bs
Updating language packs of all activated extensions for locales "bs"
52/52 [============================] 100%
$ ./typo3/cli_dispatch.phpsh extbase language:update ca
Updating language packs of all activated extensions for locales "ca"
52/52 [============================] 100%
$ ./typo3/cli_dispatch.phpsh extbase language:update bs,de,ca
Updating language packs of all activated extensions for locales "bs, de, ca"
156/156 [============================] 100%

Error case:
$ ./typo3/cli_dispatch.phpsh extbase language:update bs, de, ca
Updating language packs of all activated extensions for locales "bs"
52/52 [============================] 100%

- v8 Problem seems to be the space between the iso codes
web/typo3/sysext/extbase/Classes/Mvc/Cli/RequestBuilder.php

=> $rawCommandLineArguments = is_array($commandLine) ? $commandLine : explode(' ', $commandLine);

- v9 Problem seems to be a missing explode of the list. (Will apply a patch)

Actions #2

Updated by Gerrit Code Review over 5 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/57786

Actions #3

Updated by Markus Klein over 5 years ago

Did you test ./typo3/sysext/core/bin/typo3 language:update too on v8?

Actions #4

Updated by Guido Schmechel over 5 years ago

$ ./typo3/sysext/core/bin/typo3 language:update bs, ca, de
Updating language packs of all activated extensions for locales "bs"
5/52 [==>-------------------------] 9%

It's running into the same Controller: web/typo3/sysext/lang/Classes/Command/LanguageCommandController.php

Actions #5

Updated by Guido Schmechel over 5 years ago

v7 and v8 explode parameters by space. So i think we should not fix this in v7 and v8, because of the great effort. Workaround for ticket author: Don't use spaces in locale list ;-)

v9 patch is applied.

Actions #6

Updated by J. Peter M. Schuler over 5 years ago

I don't use spaces in the locale list. This list is generated from LocalConfiguration.php automatically if you run that command without options to fallback to "all configured languages".

./typo3/sysext/core/bin/typo3 language:update

results in the above behaviour.

7LTS implodes the parameter with a space for output https://github.com/TYPO3/TYPO3.CMS/blob/TYPO3_7-6/typo3/sysext/lang/Classes/Command/LanguageCommandController.php#L79 only, that's why I thought it must have been something different.

Actions #7

Updated by Guido Schmechel over 5 years ago

Thanks for the hint, but this implode is just only for the output. If i start

./typo3/sysext/core/bin/typo3 language:update

all languages are fetched. (Tested with 8.7.18)

Same on 7.6.30:

$ ./typo3/cli_dispatch.phpsh extbase language:update
Updating language packs of all activated extensions for locales "fr, de"
6/138 [=>--------------------------] 4%

Can you add your executed command to fetch the languages? That's just not clear to me.

Actions #8

Updated by J. Peter M. Schuler over 5 years ago

7LTS:

Output of a manually updated machine (State how it should be)

$ ls web/typo3conf/l10n/; ls web/typo3conf/l10n/*
de  nl
web/typo3conf/l10n/de:
backend       css_styled_content  fluid             info_pagetsconfig  oelib            recycler         scheduler           sv               viewpage
belog         extbase             frontend          install            opendocs         reports          seminars            sys_note
beuser        extensionmanager    ig_ldap_sso_auth  irfaq              perfectlightbox  rsaauth          setup               t3editor
context_help  felogin             impexp            lang               powermail        rtehtmlarea      sr_feuser_register  templavoilaplus
core          filelist            indexed_search    lowlevel           recordlist       saltedpasswords  static_info_tables  tstemplate

web/typo3conf/l10n/nl:
backend       core                felogin   ig_ldap_sso_auth   install   oelib            recordlist  rtehtmlarea      setup               sys_note
belog         css_styled_content  filelist  impexp             irfaq     opendocs         recycler    saltedpasswords  sr_feuser_register  t3editor
beuser        extbase             fluid     indexed_search     lang      perfectlightbox  reports     scheduler        static_info_tables  tstemplate
context_help  extensionmanager    frontend  info_pagetsconfig  lowlevel  powermail        rsaauth     seminars         sv                  viewpage

Recreating the problem:

$ rm -rf web/typo3conf/l10n/
$ web/typo3/cli_dispatch.phpsh extbase language:update
Updating language packs of all activated extensions for locales "nl, de" 
  70/192 [==========>-----------------]  36%

Resulting inconsistent state
$ ls web/typo3conf/l10n/; ls web/typo3conf/l10n/*
de  nl
web/typo3conf/l10n/de:
templavoilaplus

web/typo3conf/l10n/nl:
backend       core                felogin   ig_ldap_sso_auth   install   oelib            recordlist  rtehtmlarea      setup               sys_note
belog         css_styled_content  filelist  impexp             irfaq     opendocs         recycler    saltedpasswords  sr_feuser_register  t3editor
beuser        extbase             fluid     indexed_search     lang      perfectlightbox  reports     scheduler        static_info_tables  tstemplate
context_help  extensionmanager    frontend  info_pagetsconfig  lowlevel  powermail        rsaauth     seminars         sv                  viewpage

8LTS:

Output of a manually updated machine (State how it should be)

$ ls web/typo3conf/l10n/; ls web/typo3conf/l10n/*
de  nl
web/typo3conf/l10n/de:
backend       core                felogin   ig_ldap_sso_auth   install   oelib       reports          seminars            sv               tstemplate
belog         css_styled_content  filelist  impexp             irfaq     opendocs    rsaauth          setup               sys_note         viewpage
beuser        extbase             fluid     indexed_search     lang      recordlist  saltedpasswords  sr_feuser_register  t3editor
context_help  extensionmanager    frontend  info_pagetsconfig  lowlevel  recycler    scheduler        static_info_tables  templavoilaplus

web/typo3conf/l10n/nl:
backend       core                felogin   ig_ldap_sso_auth   install   oelib       reports          seminars            sv          viewpage
belog         css_styled_content  filelist  impexp             irfaq     opendocs    rsaauth          setup               sys_note
beuser        extbase             fluid     indexed_search     lang      recordlist  saltedpasswords  sr_feuser_register  t3editor
context_help  extensionmanager    frontend  info_pagetsconfig  lowlevel  recycler    scheduler        static_info_tables  tstemplate

Recreating the problem (vendor/bin because of composer install)

$ rm -rf web/typo3conf/l10n/
$ vendor/bin/typo3 language:update
Updating language packs of all activated extensions for locales "nl, de" 
 166/166 [============================] 100%

Resulting inconsistent state
$ ls web/typo3conf/l10n/; ls web/typo3conf/l10n/*
de  nl
web/typo3conf/l10n/de:
templavoilaplus

web/typo3conf/l10n/nl:
backend       core                felogin   ig_ldap_sso_auth   install   oelib       reports          seminars            sv          viewpage
belog         css_styled_content  filelist  impexp             irfaq     opendocs    rsaauth          setup               sys_note
beuser        extbase             fluid     indexed_search     lang      recordlist  saltedpasswords  sr_feuser_register  t3editor
context_help  extensionmanager    frontend  info_pagetsconfig  lowlevel  recycler    scheduler        static_info_tables  tstemplate

(sry had an error in editing this comment saving half a new one)

Actions #9

Updated by Anja Leichsenring over 5 years ago

can not reproduce in v8. activated languages are: ar, da, nl.

www-data@c897d3be1603:~/public$ bin/typo3 language:update ar,da
Updating language packs of all activated extensions for locales "ar, da" 
 108/108 [============================] 100%

same output with

www-data@c897d3be1603:~/public$ bin/typo3 language:update "ar, da" 
Updating language packs of all activated extensions for locales "ar, da" 
 108/108 [============================] 100%

www-data@c897d3be1603:~/public$ ls typo3conf/l10n/; ls typo3conf/l10n/*
ar  da
typo3conf/l10n/ar:
about    context_help        extbase           filemetadata          frontend           install        opendocs    rsaauth          static_info_tables  t3editor    viewpage
backend  core                extensionmanager  fluid                 impexp             lang           recordlist  saltedpasswords  sv                  taskcenter  wizard_crpages
belog    css_styled_content  felogin           fluid_styled_content  indexed_search     linkvalidator  recycler    scheduler        sys_action          tstemplate  wizard_sortpages
beuser   documentation       filelist          form                  info_pagetsconfig  lowlevel       reports     setup            sys_note            version     workspaces

typo3conf/l10n/da:
about    bootstrap_package   documentation     filelist              form            info_pagetsconfig  lowlevel    reports          setup               sys_note    version           workspaces
backend  context_help        extbase           filemetadata          frontend        install            opendocs    rsaauth          static_info_tables  t3editor    viewpage
belog    core                extensionmanager  fluid                 impexp          lang               recordlist  saltedpasswords  sv                  taskcenter  wizard_crpages
beuser   css_styled_content  felogin           fluid_styled_content  indexed_search  linkvalidator      recycler    scheduler        sys_action          tstemplate  wizard_sortpages
Actions #10

Updated by Guido Schmechel over 5 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #11

Updated by Mathias Brodala over 5 years ago

Notice that this is based on a misunderstanding of Symfony console commands. You should have used the following instead:

$ bin/typo3 language:update ar da

So separate values by space instead of comma.

Actions #12

Updated by Gerrit Code Review over 5 years ago

  • Status changed from Resolved 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/58137

Actions #13

Updated by Gerrit Code Review over 5 years ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58137

Actions #14

Updated by Mathias Brodala over 5 years ago

Here's a full example having "de" and "ja" activated:

$ ll typo3conf/l10n/
total 8
drwxrwsr-x 2 user user 4096 Sep  3 13:28 ./
drwxr-xr-x 7 user user 4096 May 25 10:02 ../
$ bin/typo3 l:u de ja -vvv
Updating language packs of all activated extensions for locale(s) "de", "ja" 
 42/42 [============================] 100% 12 secs/12 secs 26.0 MiB
$ ll typo3conf/l10n/
total 16
drwxrwsr-x  4 user user 4096 Sep  3 13:28 ./
drwxr-xr-x  7 user user 4096 May 25 10:02 ../
drwxrwsr-x 23 user user 4096 Sep  3 13:28 de/
drwxrwsr-x 23 user user 4096 Sep  3 13:28 ja/
Actions #15

Updated by Gerrit Code Review over 5 years ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58137

Actions #16

Updated by Gerrit Code Review over 5 years ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58137

Actions #17

Updated by Gerrit Code Review over 5 years ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58137

Actions #18

Updated by Gerrit Code Review over 5 years ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/58137

Actions #19

Updated by Mathias Brodala over 5 years ago

  • Status changed from Under Review to Resolved
Actions #20

Updated by Gerrit Code Review over 5 years ago

  • Status changed from Resolved 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/58139

Actions #21

Updated by Mathias Brodala over 5 years ago

  • Status changed from Under Review to Resolved
Actions #22

Updated by Benni Mack over 5 years ago

  • Status changed from Resolved to Closed
Actions #23

Updated by Georg Ringer over 3 years ago

  • Related to Bug #91876: Updating multiple language via scheduler will fail added
Actions

Also available in: Atom PDF